574: if(regid_proc = true) then
575: insert into hz_application_trans_gt(app_id,party_id) select 542, temp.party_id from hz_purge_gt temp where
576:
577:
578: exists (select 'Y' from CSI_ITEM_INSTANCES xx where xx.OWNER_PARTY_ID = temp.party_id
579: )
580:
581: or exists (select 'Y' from HZ_PARTY_SITES
582: xx where xx.PARTY_ID = temp.party_id
634: else
635: delete from hz_purge_gt temp where
636:
637:
638: exists (select 'Y' from CSI_ITEM_INSTANCES xx where xx.OWNER_PARTY_ID = temp.party_id
639: )
640:
641: or exists (select 'Y' from HZ_PARTY_SITES
642: xx where xx.PARTY_ID = temp.party_id
3682: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3683: temp.party_id in (select /*+ parallel(xx)*/ xx.CONTACT_PARTY_ID from PRP_PROPOSALS xx
3684: );
3685: end if;
3686: --CSI_ITEM_INSTANCES;LOCATION_ID
3687: appid:=542;
3688: if(regid_proc = true) then
3689: insert into hz_application_trans_gt(app_id,party_id) select 542, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 542 and appl.party_id=temp.party_id) and
3690:
3691: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
3692: xx
3693: where (nvl(STATUS, 'A') in ('A','I'))
3694: and xx.PARTY_SITE_ID
3695: in (select /*+ parallel(yy)*/ yy.LOCATION_ID from CSI_ITEM_INSTANCES
3696: yy
3697: ));
3698: else
3699: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3700: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
3701: xx
3702: where (nvl(STATUS, 'A') in ('A','I'))
3703: and xx.PARTY_SITE_ID
3704: in (select /*+ parallel(yy)*/ yy.LOCATION_ID from CSI_ITEM_INSTANCES
3705: yy
3706: ));
3707: end if;
3708: --CSI_ITEM_INSTANCES;INSTALL_LOCATION_ID
3704: in (select /*+ parallel(yy)*/ yy.LOCATION_ID from CSI_ITEM_INSTANCES
3705: yy
3706: ));
3707: end if;
3708: --CSI_ITEM_INSTANCES;INSTALL_LOCATION_ID
3709: appid:=542;
3710: if(regid_proc = true) then
3711: insert into hz_application_trans_gt(app_id,party_id) select 542, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 542 and appl.party_id=temp.party_id) and
3712:
3713: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
3714: xx
3715: where (nvl(STATUS, 'A') in ('A','I'))
3716: and xx.PARTY_SITE_ID
3717: in (select /*+ parallel(yy)*/ yy.INSTALL_LOCATION_ID from CSI_ITEM_INSTANCES
3718: yy
3719: ));
3720: else
3721: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3722: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
3723: xx
3724: where (nvl(STATUS, 'A') in ('A','I'))
3725: and xx.PARTY_SITE_ID
3726: in (select /*+ parallel(yy)*/ yy.INSTALL_LOCATION_ID from CSI_ITEM_INSTANCES
3727: yy
3728: ));
3729: end if;
3730: --CSI_T_TXN_SYSTEMS;INSTALL_SITE_USE_ID