83: bis_collection_utilities.log('truncating dates table',1);
84:
85: if biv_dbi_collection_util.truncate_table
86: ( l_biv_schema
87: , 'BIV_DBI_BACKLOG_AGE_DATES'
88: , l_error_message ) <> 0 then
89: raise l_exception;
90: end if;
91:
91:
92: bis_collection_utilities.log('loading dates table',1);
93:
94: insert
95: into biv_dbi_backlog_age_dates
96: ( report_date
97: , record_type_id
98: , creation_date
99: , created_by
293: bis_collection_utilities.log('gathering stats on dates table',1);
294:
295: if biv_dbi_collection_util.gather_statistics
296: ( l_biv_schema
297: , 'BIV_DBI_BACKLOG_AGE_DATES'
298: , l_error_message ) <> 0 then
299: raise l_exception;
300: end if;
301:
598: , f.incident_urgency_id
599: , f.incident_owner_id
600: , f.escalated_flag
601: from
602: (select /*+ parallel(a) */ distinct(report_date) report_date from biv_dbi_backlog_age_dates a) c
603: , biv_dbi_backlog_sum_f f
604: , eni_oltp_item_star pc
605: where
606: c.report_date between greatest(f.backlog_date_from, f.incident_date)