[Home] [Help]
3998: delete /*+ parallel(temp) */ from hz_purge_gt temp where
3999: temp.party_id in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_SALES_CREDITS_DENORM xx
4000: );
4001: end if;
4002: --AS_LEADS_LOG;CUSTOMER_ID
4003: appid:=279;
4004: if(regid_proc = true) then
4005: insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 279 and appl.party_id=temp.party_id) and
4006:
4003: appid:=279;
4004: if(regid_proc = true) then
4005: insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 279 and appl.party_id=temp.party_id) and
4006:
4007: temp.party_id in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx
4008: );
4009: else
4010: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4011: temp.party_id in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx
4007: temp.party_id in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx
4008: );
4009: else
4010: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4011: temp.party_id in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx
4012: );
4013: end if;
4014: --AS_LEADS_LOG;ADDRESS_ID
4015: appid:=279;
4010: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4011: temp.party_id in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx
4012: );
4013: end if;
4014: --AS_LEADS_LOG;ADDRESS_ID
4015: appid:=279;
4016: if(regid_proc = true) then
4017: insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 279 and appl.party_id=temp.party_id) and
4018:
4019: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
4020: xx
4021: where (nvl(STATUS, 'A') in ('A','I'))
4022: and xx.PARTY_SITE_ID
4023: in (select /*+ parallel(yy)*/ yy.ADDRESS_ID from AS_LEADS_LOG
4024: yy
4025: ));
4026: else
4027: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4028: temp.party_id in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
4029: xx
4030: where (nvl(STATUS, 'A') in ('A','I'))
4031: and xx.PARTY_SITE_ID
4032: in (select /*+ parallel(yy)*/ yy.ADDRESS_ID from AS_LEADS_LOG
4033: yy
4034: ));
4035: end if;
4036: --AS_LEADS_LOG;CLOSE_COMPETITOR_ID
4032: in (select /*+ parallel(yy)*/ yy.ADDRESS_ID from AS_LEADS_LOG
4033: yy
4034: ));
4035: end if;
4036: --AS_LEADS_LOG;CLOSE_COMPETITOR_ID
4037: appid:=279;
4038: if(regid_proc = true) then
4039: insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 279 and appl.party_id=temp.party_id) and
4040:
4037: appid:=279;
4038: if(regid_proc = true) then
4039: insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 279 and appl.party_id=temp.party_id) and
4040:
4041: temp.party_id in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx
4042: );
4043: else
4044: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4045: temp.party_id in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx
4041: temp.party_id in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx
4042: );
4043: else
4044: delete /*+ parallel(temp) */ from hz_purge_gt temp where
4045: temp.party_id in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx
4046: );
4047: end if;
4048: --AS_CURRENT_ENVIRONMENT;CUSTOMER_ID
4049: appid:=279;