4148: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4149: temp.party_id in (select /*+ parallel(xx)*/ xx.OWNER_PARTY_ID from PON_THREADS xx
4150: );
4151: end if;
4152: --PON_THREAD_ENTRIES;FROM_ID
4153: appid:=396;
4154: if(regid_proc = true) then
4155: insert into hz_application_trans_gt(app_id,party_id) select 396, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 396 and appl.party_id=temp.party_id) and
4156:
4153: appid:=396;
4154: if(regid_proc = true) then
4155: insert into hz_application_trans_gt(app_id,party_id) select 396, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 396 and appl.party_id=temp.party_id) and
4156:
4157: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx
4158: );
4159: else
4160: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4161: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx
4157: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx
4158: );
4159: else
4160: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4161: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx
4162: );
4163: end if;
4164: --PON_THREAD_ENTRIES;FROM_COMPANY_ID
4165: appid:=396;
4160: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4161: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx
4162: );
4163: end if;
4164: --PON_THREAD_ENTRIES;FROM_COMPANY_ID
4165: appid:=396;
4166: if(regid_proc = true) then
4167: insert into hz_application_trans_gt(app_id,party_id) select 396, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 396 and appl.party_id=temp.party_id) and
4168:
4165: appid:=396;
4166: if(regid_proc = true) then
4167: insert into hz_application_trans_gt(app_id,party_id) select 396, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 396 and appl.party_id=temp.party_id) and
4168:
4169: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx
4170: );
4171: else
4172: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4173: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx
4169: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx
4170: );
4171: else
4172: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4173: temp.party_id in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx
4174: );
4175: end if;
4176: --PON_TE_RECIPIENTS;TO_COMPANY_ID
4177: appid:=396;