590: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
591: l_msg_count NUMBER;
592: l_msg_data VARCHAR2(2400);
593:
594: --uses qa_pc_results_relationship to ensure we don't count orphan child rows
595: CURSOR C1 IS
596: SELECT count(qr.occurrence)
597: FROM qa_results qr
598: WHERE qr.collection_id = p_collection_id
596: SELECT count(qr.occurrence)
597: FROM qa_results qr
598: WHERE qr.collection_id = p_collection_id
599: AND qr.occurrence NOT IN (SELECT qprr.child_occurrence
600: FROM qa_pc_results_relationship qprr);
601: l_res_count NUMBER := 0;
602: BEGIN
603:
604: --