[Home] [Help]
2304: begin
2305:
2306: if(P_RERUN = 'Y') then
2307: -- re-run
2308: INSERT INTO HZ_IMP_CONTACTS_SG
2309: ( RELATIONSHIP_TYPE,
2310: RELATIONSHIP_CODE,
2311: START_DATE,
2312: END_DATE,
2387: and cont_int.obj_orig_system_reference = obj_int.party_orig_system_reference (+)
2388: and cont_int.obj_orig_system = obj_int.party_orig_system (+)
2389: );
2390: else
2391: INSERT INTO HZ_IMP_CONTACTS_SG
2392: ( RELATIONSHIP_TYPE,
2393: RELATIONSHIP_CODE,
2394: START_DATE,
2395: END_DATE,
2520: cont_sg.sub_id cont_sub_id,
2521: cont_sg.action_flag cont_action_flag,
2522: conrole_int.role_type role_type
2523: from hz_imp_contactroles_int conrole_int,
2524: hz_imp_contacts_sg cont_sg,
2525: hz_orig_sys_references con_mosr,
2526: hz_imp_parties_sg party_sg,
2527: hz_orig_sys_references party_mosr--,
2528: where conrole_int.batch_id = P_BATCH_ID
2589: cont_sg.sub_id cont_sub_id,
2590: cont_sg.action_flag cont_action_flag,
2591: conrole_int.role_type role_type
2592: from hz_imp_contactroles_int conrole_int,
2593: hz_imp_contacts_sg cont_sg,
2594: hz_orig_sys_references con_mosr,
2595: hz_imp_parties_sg party_sg,
2596: hz_orig_sys_references party_mosr--,
2597: where conrole_int.batch_id = P_BATCH_ID