415:
416: or exists (select 'Y' from OZF_OFFERS xx where xx.BUYING_GROUP_CONTACT_ID = temp.party_id
417: )
418:
419: or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID = temp.party_id
420: )
421:
422: or exists (select 'Y' from OZF_CODE_CONVERSIONS_ALL xx where xx.PARTY_ID = temp.party_id
423: )
424:
425: or exists (select 'Y' from OZF_RESALE_BATCHES_ALL xx where xx.PARTNER_PARTY_ID = temp.party_id
426: )
427:
428: or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID = temp.party_id
429: );
430: else
431: delete from hz_purge_gt temp where
432:
448:
449: or exists (select 'Y' from OZF_OFFERS xx where xx.BUYING_GROUP_CONTACT_ID = temp.party_id
450: )
451:
452: or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID = temp.party_id
453: )
454:
455: or exists (select 'Y' from OZF_CODE_CONVERSIONS_ALL xx where xx.PARTY_ID = temp.party_id
456: )
457:
458: or exists (select 'Y' from OZF_RESALE_BATCHES_ALL xx where xx.PARTNER_PARTY_ID = temp.party_id
459: )
460:
461: or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID = temp.party_id
462: );
463: end if;
464:
465:
3354: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3355: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx
3356: );
3357: end if;
3358: --OZF_REQUEST_HEADERS_ALL_B;END_CUST_PARTY_ID
3359: appid:=682;
3360: if(regid_proc = true) then
3361: insert into hz_application_trans_gt(app_id,party_id) select 682, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 682 and appl.party_id=temp.party_id) and
3362:
3359: appid:=682;
3360: if(regid_proc = true) then
3361: insert into hz_application_trans_gt(app_id,party_id) select 682, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 682 and appl.party_id=temp.party_id) and
3362:
3363: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3364: );
3365: else
3366: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3367: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3363: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3364: );
3365: else
3366: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3367: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3368: );
3369: end if;
3370: --OZF_REQUEST_HEADERS_ALL_B;RESELLER_PARTY_ID
3371: appid:=682;
3366: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3367: temp.party_id in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3368: );
3369: end if;
3370: --OZF_REQUEST_HEADERS_ALL_B;RESELLER_PARTY_ID
3371: appid:=682;
3372: if(regid_proc = true) then
3373: insert into hz_application_trans_gt(app_id,party_id) select 682, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 682 and appl.party_id=temp.party_id) and
3374:
3371: appid:=682;
3372: if(regid_proc = true) then
3373: insert into hz_application_trans_gt(app_id,party_id) select 682, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 682 and appl.party_id=temp.party_id) and
3374:
3375: temp.party_id in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3376: );
3377: else
3378: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3379: temp.party_id in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3375: temp.party_id in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3376: );
3377: else
3378: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3379: temp.party_id in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx
3380: );
3381: end if;
3382: --OZF_OFFERS;AUTOPAY_PARTY_ID
3383: appid:=682;