657: -- For a given date range, This cursor gets all parties and period,
658: -- which have any data in bic_customer_summary_all
659: cursor c_parties is
660: select distinct party_id, period_start_date
661: from bic_party_summary
662: where period_start_date between p_start_date and p_end_date;
663:
664: -- This cursor gets measure_code and its value for a party and period
665: cursor c_measure_values is
663:
664: -- This cursor gets measure_code and its value for a party and period
665: cursor c_measure_values is
666: select measure_code, value
667: from bic_party_summary
668: where period_start_date = g_date
669: and party_id = g_party_id;
670:
671: l_date date;
808: delete from bic_customer_summary_all
809: where period_start_date between p_start_date and p_end_date;
810: commit;
811:
812: -- delete records from bic_party_summary
813: delete from bic_party_summary
814: where period_start_date between p_start_date and p_end_date;
815: commit;
816: end purge_summary_data;
809: where period_start_date between p_start_date and p_end_date;
810: commit;
811:
812: -- delete records from bic_party_summary
813: delete from bic_party_summary
814: where period_start_date between p_start_date and p_end_date;
815: commit;
816: end purge_summary_data;
817:
817:
818: procedure purge_party_summary_data is
819: begin
820:
821: -- delete records from bic_party_summary
822: delete
823: from bic_party_summary;
824: -- commit;
825: end purge_party_summary_data;
819: begin
820:
821: -- delete records from bic_party_summary
822: delete
823: from bic_party_summary;
824: -- commit;
825: end purge_party_summary_data;
826:
827: procedure purge_customer_summary_data is