5395:
5396: Cursor sys_hist_csr (p_from_trans IN NUMBER,
5397: p_to_trans IN NUMBER) IS
5398: Select csh.*
5399: From CSI_SYSTEMS_H csh,
5400: CSI_TRANSACTIONS csit
5401: Where csit.transaction_id between from_trans and to_trans
5402: And csit.creation_date < to_date(purge_to_date, 'YYYY/MM/DD HH24:MI:SS')
5403: And csh.transaction_id = csit.transaction_id;
5412: Begin
5413: Select object_id
5414: Into l_table_id
5415: From csi_object_dictionary
5416: Where object_name = 'CSI_SYSTEMS_H';
5417: Exception
5418: When no_data_found Then
5419: l_table_id := 10;
5420: When others Then
5857: -- Purge the corresonding Archive data from the Systems history tables
5858:
5859: FORALL i IN 1 .. l_cnt
5860:
5861: Delete From CSI_SYSTEMS_H
5862: Where system_history_id = l_sys_hist_rec_tab.system_history_id(i);
5863:
5864:
5865: End If; -- if l_cnt > 0
6039: --
6040: Begin
6041: Select COUNT(*)
6042: Into l_temp9
6043: From CSI_SYSTEMS_H csh,
6044: CSI_TRANSACTIONS csit
6045: Where csit.transaction_id between From_trans and To_trans
6046: And csit.creation_date < to_date(purge_to_date, 'YYYY/MM/DD HH24:MI:SS')
6047: And csh.transaction_id = csit.transaction_id;