DBA Data[Home] [Help]

APPS.HZ_PURGE_GEN SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 16

select party_id from hz_purge_gt;
Line: 27

delete from hz_application_trans_gt; 
Line: 34

insert into hz_application_trans_gt(app_id,party_id) select 691, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_ENTY_ATTR_VALUES xx where xx.ENTITY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_ASSIGNMENTS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_ASSIGNMENT_LOGS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_SEARCH_ATTR_VALUES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_GE_PTNR_RESPS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_PSS_LINES xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_GE_PARTY_NOTIFICATIONS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PG_ENRL_REQUESTS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PG_MEMBERSHIPS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from PV_REFERRALS_B
 yy where yy.CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.CUSTOMER_CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_ASSIGNMENTS xx where xx.RELATED_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PARTNER_ACCESSES xx where xx.PARTNER_ID =  temp.party_id 
 );
Line: 133

delete from hz_purge_gt temp where 


 exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_ENTY_ATTR_VALUES xx where xx.ENTITY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_ASSIGNMENTS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_ASSIGNMENT_LOGS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_SEARCH_ATTR_VALUES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_GE_PTNR_RESPS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_PSS_LINES xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_GE_PARTY_NOTIFICATIONS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PG_ENRL_REQUESTS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PG_MEMBERSHIPS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from PV_REFERRALS_B
 yy where yy.CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from PV_REFERRALS_B zz where zz.CUSTOMER_ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from PV_REFERRALS_B xx where xx.CUSTOMER_CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_LEAD_ASSIGNMENTS xx where xx.RELATED_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PV_PARTNER_ACCESSES xx where xx.PARTNER_ID =  temp.party_id 
 );
Line: 237

insert into hz_application_trans_gt(app_id,party_id) select 665, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from WSH_CARRIERS xx where xx.CARRIER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from WSH_CARRIER_SITES
 yy where yy.CARRIER_SITE_ID=xx.PARTY_SITE_ID
));
Line: 251

delete from hz_purge_gt temp where 


 exists (select 'Y' from WSH_CARRIERS xx where xx.CARRIER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from WSH_CARRIER_SITES
 yy where yy.CARRIER_SITE_ID=xx.PARTY_SITE_ID
));
Line: 270

insert into hz_application_trans_gt(app_id,party_id) select 222, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
 and nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.SELLING_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_CUSTOMER_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_ORGANIZATION_PROFILES xx where xx.DISPLAYED_DUNS_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_RELATIONSHIPS xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F'))

 or exists (select 'Y' from HZ_RELATIONSHIPS xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F'));
Line: 301

delete from hz_purge_gt temp where 


 exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
 and nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.SELLING_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_CUSTOMER_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_ORGANIZATION_PROFILES xx where xx.DISPLAYED_DUNS_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I')))

 or exists (select 'Y' from HZ_RELATIONSHIPS xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F'))

 or exists (select 'Y' from HZ_RELATIONSHIPS xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F'));
Line: 337

insert into hz_application_trans_gt(app_id,party_id) select 671, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from IBE_SH_SHP_LISTS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBE_ORD_ONECLICK_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IBE_ORD_ONECLICK_ALL
 yy where yy.BILL_TO_PTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IBE_ORD_ONECLICK_ALL
 yy where yy.SHIP_TO_PTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from IBE_MSITE_PRTY_ACCSS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 365

delete from hz_purge_gt temp where 


 exists (select 'Y' from IBE_SH_SHP_LISTS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBE_ORD_ONECLICK_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IBE_ORD_ONECLICK_ALL
 yy where yy.BILL_TO_PTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IBE_ORD_ONECLICK_ALL
 yy where yy.SHIP_TO_PTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from IBE_MSITE_PRTY_ACCSS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 398

insert into hz_application_trans_gt(app_id,party_id) select 682, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from OZF_CUST_TRD_PRFLS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CLAIMS_ALL xx where xx.BROKER_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CLAIMS_ALL xx where xx.CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_ACT_BUDGETS xx where xx.BUDGET_SOURCE_ID =  temp.party_id 
 and (BUDGET_SOURCE_TYPE='PTNR'))

 or exists (select 'Y' from OZF_ACT_BUDGETS xx where xx.VENDOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_OFFERS xx where xx.BUYING_GROUP_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CODE_CONVERSIONS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_RESALE_BATCHES_ALL xx where xx.PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID =  temp.party_id 
 );
Line: 431

delete from hz_purge_gt temp where 


 exists (select 'Y' from OZF_CUST_TRD_PRFLS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CLAIMS_ALL xx where xx.BROKER_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CLAIMS_ALL xx where xx.CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_ACT_BUDGETS xx where xx.BUDGET_SOURCE_ID =  temp.party_id 
 and (BUDGET_SOURCE_TYPE='PTNR'))

 or exists (select 'Y' from OZF_ACT_BUDGETS xx where xx.VENDOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_OFFERS xx where xx.BUYING_GROUP_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_CODE_CONVERSIONS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_RESALE_BATCHES_ALL xx where xx.PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OZF_REQUEST_HEADERS_ALL_B xx where xx.PARTNER_ID =  temp.party_id 
 );
Line: 469

insert into hz_application_trans_gt(app_id,party_id) select 695, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from IEX_DELINQUENCIES_ALL xx where xx.PARTY_CUST_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IEX_CASE_CONTACTS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
));
Line: 483

delete from hz_purge_gt temp where 


 exists (select 'Y' from IEX_DELINQUENCIES_ALL xx where xx.PARTY_CUST_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from IEX_CASE_CONTACTS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
));
Line: 502

insert into hz_application_trans_gt(app_id,party_id) select 661, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from QP_QUALIFIERS xx where xx.QUALIFIER_ATTR_VALUE =  to_char(temp.party_id) 
 and ((qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE1'  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute ='QUALIFIER_ATTRIBUTE16'  OR qualifier_context = 'CUSTOMER_GROUP' AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE3'  OR qualifier_context = 'PARTY' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from QP_QUALIFIERS
 yy where yy.QUALIFIER_ATTR_VALUE=to_char(xx.PARTY_SITE_ID)
 and (qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 516

delete from hz_purge_gt temp where 


 exists (select 'Y' from QP_QUALIFIERS xx where xx.QUALIFIER_ATTR_VALUE =  to_char(temp.party_id) 
 and ((qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE1'  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute ='QUALIFIER_ATTRIBUTE16'  OR qualifier_context = 'CUSTOMER_GROUP' AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE3'  OR qualifier_context = 'PARTY' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from QP_QUALIFIERS
 yy where yy.QUALIFIER_ATTR_VALUE=to_char(xx.PARTY_SITE_ID)
 and (qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 535

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from POS_SUPP_PROF_EXT_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from POS_BUS_CLASS_ATTR xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 544

delete from hz_purge_gt temp where 


 exists (select 'Y' from POS_SUPP_PROF_EXT_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from POS_BUS_CLASS_ATTR xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 558

insert into hz_application_trans_gt(app_id,party_id) select 694, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from PRP_PROPOSALS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 564

delete from hz_purge_gt temp where 


 exists (select 'Y' from PRP_PROPOSALS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 575

insert into hz_application_trans_gt(app_id,party_id) select 542, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from CSI_ITEM_INSTANCES xx where xx.OWNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_T_TXN_LINE_DETAILS
 yy where yy.LOCATION_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_T_TXN_LINE_DETAILS
 yy where yy.INSTALL_LOCATION_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from CSI_I_PARTIES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.SHIP_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_PARTY_DETAILS xx where xx.PARTY_SOURCE_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.SHIP_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.BILL_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.TECHNICAL_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.SERVICE_ADMIN_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.BILL_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.SERVICE_ADMIN_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.TECHNICAL_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_SYSTEMS_B
 yy where yy.INSTALL_SITE_USE_ID=xx.PARTY_SITE_ID
));
Line: 635

delete from hz_purge_gt temp where 


 exists (select 'Y' from CSI_ITEM_INSTANCES xx where xx.OWNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_T_TXN_LINE_DETAILS
 yy where yy.LOCATION_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_T_TXN_LINE_DETAILS
 yy where yy.INSTALL_LOCATION_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from CSI_I_PARTIES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.SHIP_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_PARTY_DETAILS xx where xx.PARTY_SOURCE_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.SHIP_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.BILL_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.TECHNICAL_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_SYSTEMS_B xx where xx.SERVICE_ADMIN_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.BILL_TO_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.SERVICE_ADMIN_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSI_T_TXN_SYSTEMS xx where xx.TECHNICAL_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CSI_SYSTEMS_B
 yy where yy.INSTALL_SITE_USE_ID=xx.PARTY_SITE_ID
));
Line: 700

insert into hz_application_trans_gt(app_id,party_id) select 510, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from OKC_K_PARTY_ROLES_B xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_CONTACTS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_CONTACTS')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT2_ID1 =  to_char(temp.party_id) 
 and (jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT3_ID1 =  to_char(temp.party_id) 
 and (jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT1_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT2_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT3_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT1_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT2_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT3_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from OKC_K_ITEMS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_K_ITEMS
 yy where yy.OBJECT1_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_K_ITEMS zz where zz.OBJECT1_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))));
Line: 793

delete from hz_purge_gt temp where 


 exists (select 'Y' from OKC_K_PARTY_ROLES_B xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_CONTACTS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_CONTACTS')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT2_ID1 =  to_char(temp.party_id) 
 and (jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from OKC_RULES_B xx where xx.OBJECT3_ID1 =  to_char(temp.party_id) 
 and (jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT1_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT2_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_RULES_B
 yy where yy.OBJECT3_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT1_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT2_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object2_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_RULES_B zz where zz.OBJECT3_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object3_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))))

 or exists (select 'Y' from OKC_K_ITEMS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_PARTY')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKC_K_ITEMS
 yy where yy.OBJECT1_ID1=to_char(xx.PARTY_SITE_ID)
 and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKC_K_ITEMS zz where zz.OBJECT1_ID1=to_char(yy.PARTY_SITE_USE_ID) and jtot_object1_code IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'OKX_P_SITE_USE'))));
Line: 891

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_SHIPMENTS
 yy where yy.SHIP_TO_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.END_CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.END_CUSTOMER_CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_QUOTE_HEADERS_ALL
 yy where yy.END_CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from ASO_QUOTE_LINES_ALL xx where xx.END_CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_LINES_ALL xx where xx.END_CUSTOMER_CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_QUOTE_LINES_ALL
 yy where yy.END_CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 936

delete from hz_purge_gt temp where 


 exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_SHIPMENTS
 yy where yy.SHIP_TO_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.END_CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_HEADERS_ALL xx where xx.END_CUSTOMER_CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_QUOTE_HEADERS_ALL
 yy where yy.END_CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from ASO_QUOTE_LINES_ALL xx where xx.END_CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from ASO_QUOTE_LINES_ALL xx where xx.END_CUSTOMER_CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from ASO_QUOTE_LINES_ALL
 yy where yy.END_CUSTOMER_PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 986

insert into hz_application_trans_gt(app_id,party_id) select 777, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from OKE_K_FUNDING_SOURCES_PM_HV xx where xx.K_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKE_K_FUNDING_SOURCES xx where xx.K_PARTY_ID =  temp.party_id 
 );
Line: 995

delete from hz_purge_gt temp where 


 exists (select 'Y' from OKE_K_FUNDING_SOURCES_PM_HV xx where xx.K_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKE_K_FUNDING_SOURCES xx where xx.K_PARTY_ID =  temp.party_id 
 );
Line: 1009

insert into hz_application_trans_gt(app_id,party_id) select 867, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from AHL_DOCUMENTS_B xx where xx.SOURCE_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_SUPPLIER_DOCUMENTS xx where xx.SUPPLIER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_RECIPIENT_DOCUMENTS xx where xx.RECIPIENT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_DOC_REVISIONS_B xx where xx.APPROVED_BY_PARTY_ID =  temp.party_id 
 );
Line: 1024

delete from hz_purge_gt temp where 


 exists (select 'Y' from AHL_DOCUMENTS_B xx where xx.SOURCE_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_SUPPLIER_DOCUMENTS xx where xx.SUPPLIER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_RECIPIENT_DOCUMENTS xx where xx.RECIPIENT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AHL_DOC_REVISIONS_B xx where xx.APPROVED_BY_PARTY_ID =  temp.party_id 
 );
Line: 1044

insert into hz_application_trans_gt(app_id,party_id) select 279, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEAD_CONTACTS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEAD_CONTACTS
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from AS_SALES_LEAD_CONTACTS xx where xx.CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_ACCESSES_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.PARTNER_CONT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_INTERESTS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_INTERESTS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_ACCESSES_ALL
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_SALES_LEAD_CONTACTS xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEADS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.CLOSE_COMPETITOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.INCUMBENT_PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEAD_COMPETITORS xx where xx.COMPETITOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from AS_LEAD_CONTACTS_ALL xx where xx.CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEAD_CONTACTS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEAD_CONTACTS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS_DENORM xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS_DENORM
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS_DENORM xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS_DENORM
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEAD_CONTACTS_ALL
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_CURRENT_ENVIRONMENT
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEADS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CNT_PERSON_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEADS
 yy where yy.PRIMARY_CONTACT_PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEADS zz where zz.PRIMARY_CONTACT_PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from AS_AP_ACCOUNT_PLANS xx where xx.CUST_PARTY_ID =  temp.party_id 
 );
Line: 1363

delete from hz_purge_gt temp where 


 exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEAD_CONTACTS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEAD_CONTACTS
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from AS_SALES_LEAD_CONTACTS xx where xx.CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_ACCESSES_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_ACCESSES_ALL xx where xx.PARTNER_CONT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_INTERESTS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_INTERESTS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_INTERESTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_ACCESSES_ALL
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_SALES_LEAD_CONTACTS xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEADS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.CLOSE_COMPETITOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEADS_ALL xx where xx.INCUMBENT_PARTNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEAD_COMPETITORS xx where xx.COMPETITOR_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from AS_LEAD_CONTACTS_ALL xx where xx.CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_LEAD_CONTACTS_ALL xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEAD_CONTACTS_ALL
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS_DENORM xx where xx.PARTNER_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS_DENORM
 yy where yy.PARTNER_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_CREDITS_DENORM xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_CREDITS_DENORM
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_LEAD_CONTACTS_ALL
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_CURRENT_ENVIRONMENT
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEADS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CONTACT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CNT_PERSON_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AS_SALES_LEADS
 yy where yy.PRIMARY_CONTACT_PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AS_SALES_LEADS zz where zz.PRIMARY_CONTACT_PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from AS_AP_ACCOUNT_PLANS xx where xx.CUST_PARTY_ID =  temp.party_id 
 );
Line: 1687

insert into hz_application_trans_gt(app_id,party_id) select 673, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from IBY_ACCOUNT_OWNERS xx where xx.ACCOUNT_OWNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBY_TRXN_SUMMARIES_ALL xx where xx.PAYERID =  to_char(temp.party_id) 
 )

 or exists (select 'Y' from IBY_CREDITCARD xx where xx.CARD_OWNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBY_EXTERNAL_PAYERS_ALL xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 1702

delete from hz_purge_gt temp where 


 exists (select 'Y' from IBY_ACCOUNT_OWNERS xx where xx.ACCOUNT_OWNER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBY_TRXN_SUMMARIES_ALL xx where xx.PAYERID =  to_char(temp.party_id) 
 )

 or exists (select 'Y' from IBY_CREDITCARD xx where xx.CARD_OWNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from IBY_EXTERNAL_PAYERS_ALL xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 1722

insert into hz_application_trans_gt(app_id,party_id) select 206, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from LNS_LOAN_HEADERS_ALL xx where xx.PRIMARY_BORROWER_ID =  temp.party_id 
 )

 or exists (select 'Y' from LNS_PARTICIPANTS xx where xx.HZ_PARTY_ID =  temp.party_id 
 );
Line: 1731

delete from hz_purge_gt temp where 


 exists (select 'Y' from LNS_LOAN_HEADERS_ALL xx where xx.PRIMARY_BORROWER_ID =  temp.party_id 
 )

 or exists (select 'Y' from LNS_PARTICIPANTS xx where xx.HZ_PARTY_ID =  temp.party_id 
 );
Line: 1745

insert into hz_application_trans_gt(app_id,party_id) select 275, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from PA_CI_ACTIONS xx where xx.ASSIGNED_TO =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.OWNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PERCENT_COMPLETES xx where xx.PUBLISHED_BY_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PROJECT_REQUESTS xx where xx.CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PROJECT_SETS_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_RESOURCE_TXN_ATTRIBUTES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_CI_IMPACTS xx where xx.IMPLEMENTED_BY =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.LAST_MODIFIED_BY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.CLOSED_BY_ID =  temp.party_id 
 );
Line: 1775

delete from hz_purge_gt temp where 


 exists (select 'Y' from PA_CI_ACTIONS xx where xx.ASSIGNED_TO =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.OWNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PERCENT_COMPLETES xx where xx.PUBLISHED_BY_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PROJECT_REQUESTS xx where xx.CUST_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_PROJECT_SETS_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_RESOURCE_TXN_ATTRIBUTES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_CI_IMPACTS xx where xx.IMPLEMENTED_BY =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.LAST_MODIFIED_BY_ID =  temp.party_id 
 )

 or exists (select 'Y' from PA_CONTROL_ITEMS xx where xx.CLOSED_BY_ID =  temp.party_id 
 );
Line: 1810

insert into hz_application_trans_gt(app_id,party_id) select 396, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from PON_TE_RECIPIENTS xx where xx.TO_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDING_PARTIES xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_ITEM_PRICES xx where xx.BID_TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_AUCTION_HEADERS_ALL xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_AUCTION_EVENTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDERS_LISTS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDERS_LISTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_ATTRIBUTE_LISTS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_ATTRIBUTE_LISTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_HEADERS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_HEADERS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 );
Line: 1846

delete from hz_purge_gt temp where 


 exists (select 'Y' from PON_TE_RECIPIENTS xx where xx.TO_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDING_PARTIES xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_ITEM_PRICES xx where xx.BID_TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_AUCTION_HEADERS_ALL xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_AUCTION_EVENTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDERS_LISTS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BIDDERS_LISTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_ATTRIBUTE_LISTS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_ATTRIBUTE_LISTS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_HEADERS xx where xx.TRADING_PARTNER_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from PON_BID_HEADERS xx where xx.TRADING_PARTNER_ID =  temp.party_id 
 );
Line: 1887

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.IST_ID = yy.PARTY_SITE_USE_ID )))

 or exists (select 'Y' from OKL_LEASE_APPS_ALL_B xx where xx.PROSPECT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKL_LEASE_OPPS_ALL_B xx where xx.PROSPECT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKL_QUOTE_PARTIES xx where xx.CONTACT_OBJECT1_ID1 =  to_char(temp.party_id) 
 and (CONTACT_JTOT_OBJECT1_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from OKL_QUOTE_PARTIES xx where xx.PARTY_OBJECT1_ID1 =  to_char(temp.party_id) 
 and (PARTY_JTOT_OBJECT1_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_TRX_AR_INVOICES_B zz where zz.IBT_ID = yy.CUST_ACCT_SITE_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_CNSLD_AR_HDRS_ALL_B zz where zz.IBT_ID = yy.CUST_ACCT_SITE_ID )))

 or exists (select 'Y' from HZ_CUST_ACCOUNTS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
 yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
))
 or exists (select 'Y' from HZ_CUST_ACCOUNTS
 xx where xx.SELLING_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
 yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_RELOCATE_ASTS_ALL_B
 yy where yy.PAC_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.PAC_ID = yy.CONTACT_POINT_ID )));
Line: 1964

delete from hz_purge_gt temp where 


 exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_PARTY_SITE_USES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.IST_ID = yy.PARTY_SITE_USE_ID )))

 or exists (select 'Y' from OKL_LEASE_APPS_ALL_B xx where xx.PROSPECT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKL_LEASE_OPPS_ALL_B xx where xx.PROSPECT_ID =  temp.party_id 
 )

 or exists (select 'Y' from OKL_QUOTE_PARTIES xx where xx.CONTACT_OBJECT1_ID1 =  to_char(temp.party_id) 
 and (CONTACT_JTOT_OBJECT1_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from OKL_QUOTE_PARTIES xx where xx.PARTY_OBJECT1_ID1 =  to_char(temp.party_id) 
 and (PARTY_JTOT_OBJECT1_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_TRX_AR_INVOICES_B zz where zz.IBT_ID = yy.CUST_ACCT_SITE_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CUST_ACCT_SITES_ALL
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_CNSLD_AR_HDRS_ALL_B zz where zz.IBT_ID = yy.CUST_ACCT_SITE_ID )))

 or exists (select 'Y' from HZ_CUST_ACCOUNTS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
 yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
))
 or exists (select 'Y' from HZ_CUST_ACCOUNTS
 xx where xx.SELLING_PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
 yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OKL_RELOCATE_ASTS_ALL_B
 yy where yy.PAC_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.PAC_ID = yy.CONTACT_POINT_ID )));
Line: 2046

insert into hz_application_trans_gt(app_id,party_id) select 200, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from AP_SUPPLIER_CONTACTS xx where xx.PER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AP_SUPPLIER_CONTACTS xx where xx.REL_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 2128

delete from hz_purge_gt temp where 


 exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.RELATIONSHIP_ID=xx.RELATIONSHIP_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from AP_SUPPLIER_CONTACTS zz where zz.ORG_CONTACT_ID = yy.ORG_CONTACT_ID )))

 or exists (select 'Y' from AP_SUPPLIER_CONTACTS xx where xx.PER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AP_SUPPLIER_CONTACTS xx where xx.REL_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from AP_SUPPLIER_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 2215

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from AMS_PARTY_SOURCES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PREFERRED_VAD_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PRIMARY_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_EVENT_REGISTRATIONS xx where xx.REGISTRANT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_EVENT_REGISTRATIONS xx where xx.ATTENDANT_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_CHANNELS_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_IBA_POSTINGS_B xx where xx.CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_IBA_POSTINGS_B xx where xx.AFFILIATE_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_COMPETITOR_PRODUCTS_B xx where xx.COMPETITOR_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_VENUES_B xx where xx.PARTY_ID =  temp.party_id 
 and (OBJECT_TYPE='VENU'))

 or exists (select 'Y' from AMS_IMP_SOURCE_LINES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_LIST_ENTRIES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_LIST_ENTRIES xx where xx.PARENT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_RESOURCES xx where xx.RESOURCE_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_TCOP_CONTACT_SUMMARY xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2266

delete from hz_purge_gt temp where 


 exists (select 'Y' from AMS_PARTY_SOURCES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PARTNER_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PREFERRED_VAD_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_PARTNERS xx where xx.PRIMARY_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_EVENT_REGISTRATIONS xx where xx.REGISTRANT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_EVENT_REGISTRATIONS xx where xx.ATTENDANT_CONTACT_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_CHANNELS_B xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_IBA_POSTINGS_B xx where xx.CUSTOMER_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_IBA_POSTINGS_B xx where xx.AFFILIATE_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_COMPETITOR_PRODUCTS_B xx where xx.COMPETITOR_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_VENUES_B xx where xx.PARTY_ID =  temp.party_id 
 and (OBJECT_TYPE='VENU'))

 or exists (select 'Y' from AMS_IMP_SOURCE_LINES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_LIST_ENTRIES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_LIST_ENTRIES xx where xx.PARENT_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_ACT_RESOURCES xx where xx.RESOURCE_ID =  temp.party_id 
 )

 or exists (select 'Y' from AMS_TCOP_CONTACT_SUMMARY xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2322

insert into hz_application_trans_gt(app_id,party_id) select 511, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from CSC_CUSTOMERS xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSC_CUSTOMIZED_PLANS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2331

delete from hz_purge_gt temp where 


 exists (select 'Y' from CSC_CUSTOMERS xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from CSC_CUSTOMIZED_PLANS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2345

insert into hz_application_trans_gt(app_id,party_id) select 690, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID =  temp.party_id 
 and (SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.OLD_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_SOURCE_OBJECT_ID =  temp.party_id 
 and (NEW_SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.OLD_SOURCE_OBJECT_ID =  temp.party_id 
 and (OLD_SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_CONTACTS xx where xx.CONTACT_ID =  temp.party_id 
 and (CONTACT_TYPE_CODE = 'CUST'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_REFERENCES_B
 yy where yy.OBJECT_ID=xx.PARTY_SITE_ID
 and object_type_code in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTY_SITES' and rtrim(ltrim(upper(select_id))) = 'PARTY_SITE_ID')))

 or exists (select 'Y' from JTF_TASK_REFERENCES_B xx where xx.OBJECT_ID =  temp.party_id 
 and (OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASKS_B
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_AUDITS_B
 yy where yy.NEW_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_AUDITS_B
 yy where yy.OLD_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_PHONES
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_TASK_PHONES zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_NOTES_B
 yy where yy.SOURCE_OBJECT_ID=xx.PARTY_SITE_ID
 and source_object_code  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTY_SITES')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_NOTE_CONTEXTS
 yy where yy.NOTE_CONTEXT_TYPE_ID=xx.PARTY_SITE_ID
 and NOTE_CONTEXT_TYPE  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTY_SITES')))

 or exists (select 'Y' from JTF_NOTES_B xx where xx.SOURCE_OBJECT_ID =  temp.party_id 
 and (source_object_code  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTIES' )))

 or exists (select 'Y' from JTF_NOTE_CONTEXTS xx where xx.NOTE_CONTEXT_TYPE_ID =  temp.party_id 
 and (NOTE_CONTEXT_TYPE  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTIES')))

 or exists (select 'Y' from JTF_IH_INTERACTIONS xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_RS_RESOURCE_EXTNS xx where xx.SOURCE_ID =  temp.party_id 
 and (category IN ( 'PARTY' , 'PARTNER')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_RS_RESOURCE_EXTNS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
 and category  =   'PARTNER'))

 or exists (select 'Y' from JTF_UM_APPROVERS xx where xx.ORG_PARTY_ID =  temp.party_id 
 and (ROWNUM < 2))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TERR_VALUES_ALL
 yy where yy.LOW_VALUE_CHAR_ID=xx.PARTY_SITE_ID
 and TERR_QUAL_ID in ( select TERR_QUAL_ID from JTF_TERR_QUAL_ALL where QUAL_USG_ID in (-1511, -1435, -1078, -1064, -1063, -1037, -1014, -1002,  -1001, -1201, -1039, -1094))))

 or exists (select 'Y' from JTF_TERR_VALUES_ALL xx where xx.LOW_VALUE_CHAR_ID =  temp.party_id 
 and (TERR_QUAL_ID in ( select TERR_QUAL_ID from JTF_TERR_QUAL_ALL where QUAL_USG_ID in (-1511, -1435, -1078, -1064, -1063, -1037, -1014, -1002,  -1001, -1201, -1039, -1094))))

 or exists (select 'Y' from JTF_TASK_ASSIGNMENTS xx where xx.RESOURCE_ID =  temp.party_id 
 and (RESOURCE_TYPE_CODE  IN (SELECT object_code FROM jtf_objects_b WHERE LTRIM(RTRIM(UPPER(from_table))) = 'HZ_PARTIES' AND RTRIM(LTRIM(UPPER(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_PERZ_QUERY_PARAM xx where xx.PARAMETER_VALUE =  to_char(temp.party_id) 
 and (parameter_name = 'CUSTOMER_ID' AND query_id IN (SELECT q.query_id FROM  jtf_perz_query q, jtf_perz_query_param p WHERE q.query_type= 'JTF_TASK' AND q.application_id = 690 AND  p.query_id = q.query_id AND p.parameter_name = 'CUSTOMER' AND p.parameter_value = 'NAME')))

 or exists (select 'Y' from JTF_PERZ_QUERY_PARAM xx where xx.PARAMETER_VALUE =  to_char(temp.party_id) 
 and (parameter_name = 'CUSTOMER_ID' AND query_id IN (SELECT q.query_id FROM  jtf_perz_query q, jtf_perz_query_param p WHERE q.query_type= 'JTF_TASK' AND q.application_id = 690 AND  p.query_id = q.query_id AND p.parameter_name = 'CUSTOMER' AND p.parameter_value = 'NUMBER')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_RS_RESOURCE_EXTNS
 yy where yy.SUPPORT_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TTY_NAMED_ACCTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from JTF_TTY_NAMED_ACCTS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2539

delete from hz_purge_gt temp where 


 exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID =  temp.party_id 
 and (SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.OLD_CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_SOURCE_OBJECT_ID =  temp.party_id 
 and (NEW_SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.OLD_SOURCE_OBJECT_ID =  temp.party_id 
 and (OLD_SOURCE_OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_TASK_CONTACTS xx where xx.CONTACT_ID =  temp.party_id 
 and (CONTACT_TYPE_CODE = 'CUST'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_REFERENCES_B
 yy where yy.OBJECT_ID=xx.PARTY_SITE_ID
 and object_type_code in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTY_SITES' and rtrim(ltrim(upper(select_id))) = 'PARTY_SITE_ID')))

 or exists (select 'Y' from JTF_TASK_REFERENCES_B xx where xx.OBJECT_ID =  temp.party_id 
 and (OBJECT_TYPE_CODE in (select object_code from jtf_objects_b where ltrim(rtrim(upper(from_table))) = 'HZ_PARTIES' and rtrim(ltrim(upper(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASKS_B
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_AUDITS_B
 yy where yy.NEW_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_AUDITS_B
 yy where yy.OLD_ADDRESS_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_CONTACT_POINTS
 xx where xx.OWNER_TABLE_ID =  temp.party_id 
 and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TASK_PHONES
 yy where yy.PHONE_ID=xx.CONTACT_POINT_ID
))
 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_CONTACT_POINTS
 yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID 
 and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_TASK_PHONES zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.OBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))
 or exists (select 'Y' from HZ_RELATIONSHIPS
 xx where xx.SUBJECT_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and exists 
 (select 'Y' from HZ_ORG_CONTACTS
 yy where yy.PARTY_RELATIONSHIP_ID=xx.RELATIONSHIP_ID 
 and nvl(STATUS, 'A') in ('A','I')
 and exists 
 (select 'Y' from JTF_RS_RESOURCE_EXTNS zz where zz.CONTACT_ID = yy.ORG_CONTACT_ID and category in ('PARTY', 'PARTNER' ))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_NOTES_B
 yy where yy.SOURCE_OBJECT_ID=xx.PARTY_SITE_ID
 and source_object_code  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTY_SITES')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_NOTE_CONTEXTS
 yy where yy.NOTE_CONTEXT_TYPE_ID=xx.PARTY_SITE_ID
 and NOTE_CONTEXT_TYPE  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTY_SITES')))

 or exists (select 'Y' from JTF_NOTES_B xx where xx.SOURCE_OBJECT_ID =  temp.party_id 
 and (source_object_code  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTIES' )))

 or exists (select 'Y' from JTF_NOTE_CONTEXTS xx where xx.NOTE_CONTEXT_TYPE_ID =  temp.party_id 
 and (NOTE_CONTEXT_TYPE  IN (SELECT ojt.object_code FROM jtf_objects_b ojt  ,jtf_object_usages oue WHERE ojt.object_code = oue.object_code AND oue.object_user_code = 'NOTES' and ojt.from_table ='HZ_PARTIES')))

 or exists (select 'Y' from JTF_IH_INTERACTIONS xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from JTF_RS_RESOURCE_EXTNS xx where xx.SOURCE_ID =  temp.party_id 
 and (category IN ( 'PARTY' , 'PARTNER')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_RS_RESOURCE_EXTNS
 yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
 and category  =   'PARTNER'))

 or exists (select 'Y' from JTF_UM_APPROVERS xx where xx.ORG_PARTY_ID =  temp.party_id 
 and (ROWNUM < 2))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TERR_VALUES_ALL
 yy where yy.LOW_VALUE_CHAR_ID=xx.PARTY_SITE_ID
 and TERR_QUAL_ID in ( select TERR_QUAL_ID from JTF_TERR_QUAL_ALL where QUAL_USG_ID in (-1511, -1435, -1078, -1064, -1063, -1037, -1014, -1002,  -1001, -1201, -1039, -1094))))

 or exists (select 'Y' from JTF_TERR_VALUES_ALL xx where xx.LOW_VALUE_CHAR_ID =  temp.party_id 
 and (TERR_QUAL_ID in ( select TERR_QUAL_ID from JTF_TERR_QUAL_ALL where QUAL_USG_ID in (-1511, -1435, -1078, -1064, -1063, -1037, -1014, -1002,  -1001, -1201, -1039, -1094))))

 or exists (select 'Y' from JTF_TASK_ASSIGNMENTS xx where xx.RESOURCE_ID =  temp.party_id 
 and (RESOURCE_TYPE_CODE  IN (SELECT object_code FROM jtf_objects_b WHERE LTRIM(RTRIM(UPPER(from_table))) = 'HZ_PARTIES' AND RTRIM(LTRIM(UPPER(select_id))) = 'PARTY_ID')))

 or exists (select 'Y' from JTF_PERZ_QUERY_PARAM xx where xx.PARAMETER_VALUE =  to_char(temp.party_id) 
 and (parameter_name = 'CUSTOMER_ID' AND query_id IN (SELECT q.query_id FROM  jtf_perz_query q, jtf_perz_query_param p WHERE q.query_type= 'JTF_TASK' AND q.application_id = 690 AND  p.query_id = q.query_id AND p.parameter_name = 'CUSTOMER' AND p.parameter_value = 'NAME')))

 or exists (select 'Y' from JTF_PERZ_QUERY_PARAM xx where xx.PARAMETER_VALUE =  to_char(temp.party_id) 
 and (parameter_name = 'CUSTOMER_ID' AND query_id IN (SELECT q.query_id FROM  jtf_perz_query q, jtf_perz_query_param p WHERE q.query_type= 'JTF_TASK' AND q.application_id = 690 AND  p.query_id = q.query_id AND p.parameter_name = 'CUSTOMER' AND p.parameter_value = 'NUMBER')))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_RS_RESOURCE_EXTNS
 yy where yy.SUPPORT_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from JTF_TTY_NAMED_ACCTS
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from JTF_TTY_NAMED_ACCTS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2738

insert into hz_application_trans_gt(app_id,party_id) select 515, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from OKS_BILLING_PROFILES_B xx where xx.OWNED_PARTY_ID1 =  to_char(temp.party_id) 
 )

 or exists (select 'Y' from OKS_K_DEFAULTS xx where xx.SEGMENT_ID1 =  to_char(temp.party_id) 
 and (JTOT_OBJECT_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from OKS_SERV_AVAIL_EXCEPTS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (JTOT_OBJECT1_CODE = 'OKX_PARTY'));
Line: 2750

delete from hz_purge_gt temp where 


 exists (select 'Y' from OKS_BILLING_PROFILES_B xx where xx.OWNED_PARTY_ID1 =  to_char(temp.party_id) 
 )

 or exists (select 'Y' from OKS_K_DEFAULTS xx where xx.SEGMENT_ID1 =  to_char(temp.party_id) 
 and (JTOT_OBJECT_CODE = 'OKX_PARTY'))

 or exists (select 'Y' from OKS_SERV_AVAIL_EXCEPTS xx where xx.OBJECT1_ID1 =  to_char(temp.party_id) 
 and (JTOT_OBJECT1_CODE = 'OKX_PARTY'));
Line: 2767

insert into hz_application_trans_gt(app_id,party_id) select 0, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from FND_USER xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from FND_USER xx where xx.PERSON_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from UMX_REG_REQUESTS xx where xx.REQUESTED_FOR_PARTY_ID =  temp.party_id 
 and (ROWNUM < 2));
Line: 2779

delete from hz_purge_gt temp where 


 exists (select 'Y' from FND_USER xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from FND_USER xx where xx.PERSON_PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from UMX_REG_REQUESTS xx where xx.REQUESTED_FOR_PARTY_ID =  temp.party_id 
 and (ROWNUM < 2));
Line: 2796

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from CS_INCIDENTS_ALL_B xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from CS_HZ_SR_CONTACT_POINTS xx where xx.PARTY_ID =  temp.party_id 
 and (CONTACT_TYPE <> 'EMPLOYEE'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CS_ESTIMATE_DETAILS
 yy where yy.INVOICE_TO_ORG_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CS_ESTIMATE_DETAILS
 yy where yy.SHIP_TO_ORG_ID=xx.PARTY_SITE_ID
));
Line: 2821

delete from hz_purge_gt temp where 


 exists (select 'Y' from CS_INCIDENTS_ALL_B xx where xx.CUSTOMER_ID =  temp.party_id 
 )

 or exists (select 'Y' from CS_HZ_SR_CONTACT_POINTS xx where xx.PARTY_ID =  temp.party_id 
 and (CONTACT_TYPE <> 'EMPLOYEE'))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CS_ESTIMATE_DETAILS
 yy where yy.INVOICE_TO_ORG_ID=xx.PARTY_SITE_ID
))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from CS_ESTIMATE_DETAILS
 yy where yy.SHIP_TO_ORG_ID=xx.PARTY_SITE_ID
));
Line: 2851

insert into hz_application_trans_gt(app_id,party_id) select 660, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from OE_PRICE_ADJ_ATTRIBS xx where xx.PRICING_ATTR_VALUE_FROM =  to_char(temp.party_id) 
 and ((pricing_context = 'ASOPARTYINFO'  AND pricing_attribute = 'QUALIFIER_ATTRIBUTE1'  OR pricing_context = 'CUSTOMER' AND pricing_attribute ='QUALIFIER_ATTRIBUTE16'  OR pricing_context = 'CUSTOMER_GROUP' AND pricing_attribute = 'QUALIFIER_ATTRIBUTE3'  OR pricing_context = 'PARTY' AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OE_PRICE_ADJ_ATTRIBS
 yy where yy.PRICING_ATTR_VALUE_FROM=to_char(xx.PARTY_SITE_ID)
 and (pricing_context = 'ASOPARTYINFO'  AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR pricing_context = 'CUSTOMER' AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 2865

delete from hz_purge_gt temp where 


 exists (select 'Y' from OE_PRICE_ADJ_ATTRIBS xx where xx.PRICING_ATTR_VALUE_FROM =  to_char(temp.party_id) 
 and ((pricing_context = 'ASOPARTYINFO'  AND pricing_attribute = 'QUALIFIER_ATTRIBUTE1'  OR pricing_context = 'CUSTOMER' AND pricing_attribute ='QUALIFIER_ATTRIBUTE16'  OR pricing_context = 'CUSTOMER_GROUP' AND pricing_attribute = 'QUALIFIER_ATTRIBUTE3'  OR pricing_context = 'PARTY' AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))))

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from OE_PRICE_ADJ_ATTRIBS
 yy where yy.PRICING_ATTR_VALUE_FROM=to_char(xx.PARTY_SITE_ID)
 and (pricing_context = 'ASOPARTYINFO'  AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR pricing_context = 'CUSTOMER' AND pricing_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 2884

insert into hz_application_trans_gt(app_id,party_id) select 800, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from PER_ALL_PEOPLE_F xx where xx.PARTY_ID =  temp.party_id 
 and (effective_end_date = to_date('12/31/4712','MM/DD/YYYY')));
Line: 2890

delete from hz_purge_gt temp where 


 exists (select 'Y' from PER_ALL_PEOPLE_F xx where xx.PARTY_ID =  temp.party_id 
 and (effective_end_date = to_date('12/31/4712','MM/DD/YYYY')));
Line: 2901

insert into hz_application_trans_gt(app_id,party_id) select 174, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from ECX_TP_HEADERS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2907

delete from hz_purge_gt temp where 


 exists (select 'Y' from ECX_TP_HEADERS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2918

insert into hz_application_trans_gt(app_id,party_id) select 9004, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from INL_CHARGE_LINES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from INL_CHARGE_LINES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 2932

delete from hz_purge_gt temp where 


 exists (select 'Y' from INL_CHARGE_LINES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from HZ_PARTY_SITES
 xx where xx.PARTY_ID =  temp.party_id 
 and (nvl(STATUS, 'A') in ('A','I'))
 and exists
(select 'Y' from INL_CHARGE_LINES
 yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
));
Line: 2951

insert into hz_application_trans_gt(app_id,party_id) select 204, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from XLE_ENTITY_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from XLE_ETB_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2960

delete from hz_purge_gt temp where 


 exists (select 'Y' from XLE_ENTITY_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 )

 or exists (select 'Y' from XLE_ETB_PROFILES xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2974

insert into hz_application_trans_gt(app_id,party_id) select 666, temp.party_id from hz_purge_gt temp where 


 exists (select 'Y' from IBW_SITE_VISITS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2980

delete from hz_purge_gt temp where 


 exists (select 'Y' from IBW_SITE_VISITS xx where xx.PARTY_ID =  temp.party_id 
 );
Line: 2991

insert into hz_application_trans_gt(app_id,party_id) select 665, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 665 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from WSH_PARTY_SITES_V
 yy 
));
Line: 3001

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from WSH_PARTY_SITES_V
 yy 
));
Line: 3013

insert into hz_application_trans_gt(app_id,party_id) select 222, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 222 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_EMPLOYMENT_HISTORY
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.EMPLOYMENT_HISTORY_ID 
 in (select /*+ parallel(yy)*/ yy.EMPLOYMENT_HISTORY_ID from HZ_WORK_CLASS
 yy 
 where nvl(STATUS, 'A') in ('A','I')))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.EMPLOYED_BY_PARTY_ID from HZ_EMPLOYMENT_HISTORY
 xx 
 where (nvl(STATUS,'A') in ('A','I'))
 and  xx.EMPLOYMENT_HISTORY_ID 
 in (select /*+ parallel(yy)*/ yy.EMPLOYMENT_HISTORY_ID from HZ_WORK_CLASS
 yy 
 where nvl(STATUS, 'A') in ('A','I')));
Line: 3030

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_EMPLOYMENT_HISTORY
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.EMPLOYMENT_HISTORY_ID 
 in (select /*+ parallel(yy)*/ yy.EMPLOYMENT_HISTORY_ID from HZ_WORK_CLASS
 yy 
 where nvl(STATUS, 'A') in ('A','I')))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.EMPLOYED_BY_PARTY_ID from HZ_EMPLOYMENT_HISTORY
 xx 
 where (nvl(STATUS,'A') in ('A','I'))
 and  xx.EMPLOYMENT_HISTORY_ID 
 in (select /*+ parallel(yy)*/ yy.EMPLOYMENT_HISTORY_ID from HZ_WORK_CLASS
 yy 
 where nvl(STATUS, 'A') in ('A','I')));
Line: 3049

insert into hz_application_trans_gt(app_id,party_id) select 222, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 222 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PK1_VALUE from FND_ATTACHED_DOCUMENTS xx 
 where (entity_name = 'HZ_PARTIES'));
Line: 3054

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PK1_VALUE from FND_ATTACHED_DOCUMENTS xx 
 where (entity_name = 'HZ_PARTIES'));
Line: 3061

insert into hz_application_trans_gt(app_id,party_id) select 222, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 222 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from HZ_EMAIL_DOMAINS xx 
 );
Line: 3066

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from HZ_EMAIL_DOMAINS xx 
 );
Line: 3073

insert into hz_application_trans_gt(app_id,party_id) select 671, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 671 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBE_SH_QUOTE_ACCESS xx 
 );
Line: 3078

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBE_SH_QUOTE_ACCESS xx 
 );
Line: 3085

insert into hz_application_trans_gt(app_id,party_id) select 671, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 671 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBE_ACTIVE_QUOTES_ALL xx 
 );
Line: 3090

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBE_ACTIVE_QUOTES_ALL xx 
 );
Line: 3097

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BROKER_ID from OZF_CLAIMS_HISTORY_ALL xx 
 );
Line: 3102

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BROKER_ID from OZF_CLAIMS_HISTORY_ALL xx 
 );
Line: 3109

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CONTACT_ID from OZF_CLAIMS_HISTORY_ALL xx 
 );
Line: 3114

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CONTACT_ID from OZF_CLAIMS_HISTORY_ALL xx 
 );
Line: 3121

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3126

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3133

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SOLD_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3138

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SOLD_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3145

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3150

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3157

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3162

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3169

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3174

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3181

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3186

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3193

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3198

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3205

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3210

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_CONTACT_PARTY_ID from OZF_RESALE_LINES_INT_ALL xx 
 );
Line: 3217

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3222

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3229

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3234

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3241

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3246

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3253

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3258

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_HEADERS_ALL xx 
 );
Line: 3265

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3270

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3277

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SOLD_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3282

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SOLD_FROM_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3289

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3294

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3301

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3306

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3313

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3318

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3325

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3330

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3337

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3342

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3349

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 3354

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_CONTACT_PARTY_ID from OZF_RESALE_LINES_ALL xx 
 );
Line: 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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx 
 );
Line: 3366

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.END_CUST_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx 
 );
Line: 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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx 
 );
Line: 3378

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.RESELLER_PARTY_ID from OZF_REQUEST_HEADERS_ALL_B xx 
 );
Line: 3385

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTOPAY_PARTY_ID from OZF_OFFERS xx 
 );
Line: 3390

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTOPAY_PARTY_ID from OZF_OFFERS xx 
 );
Line: 3397

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OZF_ACTIVITY_CUSTOMERS xx 
 );
Line: 3402

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OZF_ACTIVITY_CUSTOMERS xx 
 );
Line: 3409

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUY_GROUP_PARTY_ID from OZF_CLAIM_LINES_HIST_ALL xx 
 );
Line: 3414

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUY_GROUP_PARTY_ID from OZF_CLAIM_LINES_HIST_ALL xx 
 );
Line: 3421

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTNER_CONTACT_PARTY_ID from OZF_RESALE_BATCHES_ALL xx 
 );
Line: 3426

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTNER_CONTACT_PARTY_ID from OZF_RESALE_BATCHES_ALL xx 
 );
Line: 3433

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUY_GROUP_PARTY_ID from OZF_CLAIM_LINES_ALL xx 
 );
Line: 3438

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUY_GROUP_PARTY_ID from OZF_CLAIM_LINES_ALL xx 
 );
Line: 3445

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARENT_PARTY_ID from OZF_ACCOUNT_ALLOCATIONS xx 
 );
Line: 3450

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARENT_PARTY_ID from OZF_ACCOUNT_ALLOCATIONS xx 
 );
Line: 3457

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.ROLLUP_PARTY_ID from OZF_ACCOUNT_ALLOCATIONS xx 
 );
Line: 3462

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.ROLLUP_PARTY_ID from OZF_ACCOUNT_ALLOCATIONS xx 
 );
Line: 3469

insert into hz_application_trans_gt(app_id,party_id) select 435, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 435 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INITIATOR_ID from FUN_TRX_BATCHES xx 
 );
Line: 3474

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INITIATOR_ID from FUN_TRX_BATCHES xx 
 );
Line: 3481

insert into hz_application_trans_gt(app_id,party_id) select 435, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 435 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.RECIPIENT_ID from FUN_TRX_HEADERS xx 
 );
Line: 3486

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.RECIPIENT_ID from FUN_TRX_HEADERS xx 
 );
Line: 3493

insert into hz_application_trans_gt(app_id,party_id) select 435, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 435 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from FUN_DIST_LINES xx 
 );
Line: 3498

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from FUN_DIST_LINES xx 
 );
Line: 3505

insert into hz_application_trans_gt(app_id,party_id) select 435, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 435 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.VENDOR_SITE_ID from FUN_SUPPLIER_MAPS
 yy 
));
Line: 3515

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.VENDOR_SITE_ID from FUN_SUPPLIER_MAPS
 yy 
));
Line: 3527

insert into hz_application_trans_gt(app_id,party_id) select 535, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 535 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from XDP_ORDER_HEADERS xx 
 );
Line: 3532

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from XDP_ORDER_HEADERS xx 
 );
Line: 3539

insert into hz_application_trans_gt(app_id,party_id) select 250, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 250 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from QA_RESULTS xx 
 );
Line: 3544

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from QA_RESULTS xx 
 );
Line: 3551

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 177 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.OBJECT_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.SUBJECT_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
));
Line: 3578

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.OBJECT_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.SUBJECT_ID from HZ_RELATIONSHIPS
 xx 
 where (nvl(STATUS, 'A') in ('A','I') AND subject_table_name = 'HZ_PARTIES'  AND object_table_name = 'HZ_PARTIES'
AND directional_flag = 'F')
 and  xx.RELATIONSHIP_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_ID from HZ_PARTY_USG_ASSIGNMENTS
 yy 
));
Line: 3607

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 177 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from POS_PARTY_SITE_UDA_V
 yy 
));
Line: 3617

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from POS_PARTY_SITE_UDA_V
 yy 
));
Line: 3629

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 177 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AP_SUPPLIERS xx 
 );
Line: 3634

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AP_SUPPLIERS xx 
 );
Line: 3641

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 177 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from POS_PS_MERGE_V xx 
 );
Line: 3646

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from POS_PS_MERGE_V xx 
 );
Line: 3653

insert into hz_application_trans_gt(app_id,party_id) select 177, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 177 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from POS_BANK_MERGE_V xx 
 );
Line: 3658

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from POS_BANK_MERGE_V xx 
 );
Line: 3665

insert into hz_application_trans_gt(app_id,party_id) select 694, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 694 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from PRP_EMAIL_RECIPIENTS xx 
 );
Line: 3670

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from PRP_EMAIL_RECIPIENTS xx 
 );
Line: 3677

insert into hz_application_trans_gt(app_id,party_id) select 694, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 694 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CONTACT_PARTY_ID from PRP_PROPOSALS xx 
 );
Line: 3682

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CONTACT_PARTY_ID from PRP_PROPOSALS xx 
 );
Line: 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 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.LOCATION_ID from CSI_ITEM_INSTANCES
 yy 
));
Line: 3699

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.LOCATION_ID from CSI_ITEM_INSTANCES
 yy 
));
Line: 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 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_LOCATION_ID from CSI_ITEM_INSTANCES
 yy 
));
Line: 3721

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_LOCATION_ID from CSI_ITEM_INSTANCES
 yy 
));
Line: 3733

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 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_USE_ID from CSI_T_TXN_SYSTEMS
 yy 
));
Line: 3743

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_USE_ID from CSI_T_TXN_SYSTEMS
 yy 
));
Line: 3755

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_PARTY_ID from ASO_QUOTE_HEADERS_ALL xx 
 );
Line: 3760

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_PARTY_ID from ASO_QUOTE_HEADERS_ALL xx 
 );
Line: 3767

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_PARTY_ID from ASO_QUOTE_LINES_ALL xx 
 );
Line: 3772

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_PARTY_ID from ASO_QUOTE_LINES_ALL xx 
 );
Line: 3779

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from ASO_SHIPMENTS xx 
 );
Line: 3784

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from ASO_SHIPMENTS xx 
 );
Line: 3791

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INVOICE_TO_PARTY_SITE_ID from ASO_QUOTE_HEADERS_ALL
 yy 
));
Line: 3801

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INVOICE_TO_PARTY_SITE_ID from ASO_QUOTE_HEADERS_ALL
 yy 
));
Line: 3813

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INVOICE_TO_PARTY_SITE_ID from ASO_QUOTE_LINES_ALL
 yy 
));
Line: 3823

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INVOICE_TO_PARTY_SITE_ID from ASO_QUOTE_LINES_ALL
 yy 
));
Line: 3835

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_CUST_PARTY_ID from ASO_QUOTE_HEADERS_ALL xx 
 );
Line: 3840

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_CUST_PARTY_ID from ASO_QUOTE_HEADERS_ALL xx 
 );
Line: 3847

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SOLD_TO_PARTY_SITE_ID from ASO_QUOTE_HEADERS_ALL
 yy 
));
Line: 3857

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SOLD_TO_PARTY_SITE_ID from ASO_QUOTE_HEADERS_ALL
 yy 
));
Line: 3869

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_CUST_PARTY_ID from ASO_QUOTE_LINES_ALL xx 
 );
Line: 3874

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INVOICE_TO_CUST_PARTY_ID from ASO_QUOTE_LINES_ALL xx 
 );
Line: 3881

insert into hz_application_trans_gt(app_id,party_id) select 697, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 697 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CUST_PARTY_ID from ASO_SHIPMENTS xx 
 );
Line: 3886

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CUST_PARTY_ID from ASO_SHIPMENTS xx 
 );
Line: 3893

insert into hz_application_trans_gt(app_id,party_id) select 777, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 777 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OKE_POOL_PARTIES xx 
 );
Line: 3898

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OKE_POOL_PARTIES xx 
 );
Line: 3905

insert into hz_application_trans_gt(app_id,party_id) select 867, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 867 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.REQUESTED_BY_PARTY_ID from AHL_SUBSCRIPTIONS_B xx 
 );
Line: 3910

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.REQUESTED_BY_PARTY_ID from AHL_SUBSCRIPTIONS_B xx 
 );
Line: 3917

insert into hz_application_trans_gt(app_id,party_id) select 867, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 867 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SUBSCRIBED_FRM_PARTY_ID from AHL_SUBSCRIPTIONS_B xx 
 );
Line: 3922

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SUBSCRIBED_FRM_PARTY_ID from AHL_SUBSCRIPTIONS_B xx 
 );
Line: 3929

insert into hz_application_trans_gt(app_id,party_id) select 867, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 867 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.OPERATOR_PARTY_ID from AHL_ROUTES_B xx 
 );
Line: 3934

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.OPERATOR_PARTY_ID from AHL_ROUTES_B xx 
 );
Line: 3941

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.INCUMBENT_PARTNER_PARTY_ID from AS_SALES_LEADS xx 
 );
Line: 3946

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.INCUMBENT_PARTNER_PARTY_ID from AS_SALES_LEADS xx 
 );
Line: 3953

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_SALES_CREDITS_DENORM xx 
 );
Line: 3958

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_SALES_CREDITS_DENORM xx 
 );
Line: 3965

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx 
 );
Line: 3970

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_LEADS_LOG xx 
 );
Line: 3977

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 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.ADDRESS_ID from AS_LEADS_LOG
 yy 
));
Line: 3987

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.ADDRESS_ID from AS_LEADS_LOG
 yy 
));
Line: 3999

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx 
 );
Line: 4004

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CLOSE_COMPETITOR_ID from AS_LEADS_LOG xx 
 );
Line: 4011

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_CURRENT_ENVIRONMENT xx 
 );
Line: 4016

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.CUSTOMER_ID from AS_CURRENT_ENVIRONMENT xx 
 );
Line: 4023

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.REFERRED_BY from AS_SALES_LEADS xx 
 );
Line: 4028

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.REFERRED_BY from AS_SALES_LEADS xx 
 );
Line: 4035

insert into hz_application_trans_gt(app_id,party_id) select 514, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 514 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.ATTRIBUTE_VALUE from JTF_PERZ_DATA_V xx 
 where (attribute_name = 'customer ID' and application_id = 514 and perz_data_type in ('CSS_PROFILE_DEFECT_TEMPLATE','CSS_PROFILE_ENH_TEMPLATE') and profile_name like 'CSS_514%'));
Line: 4040

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.ATTRIBUTE_VALUE from JTF_PERZ_DATA_V xx 
 where (attribute_name = 'customer ID' and application_id = 514 and perz_data_type in ('CSS_PROFILE_DEFECT_TEMPLATE','CSS_PROFILE_ENH_TEMPLATE') and profile_name like 'CSS_514%'));
Line: 4047

insert into hz_application_trans_gt(app_id,party_id) select 514, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 514 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARAMETER_VALUE from JTF_PERZ_QUERY_PARAM_V xx 
 where (parameter_name in ('CUSTOMER_ID','SR_CUSTOMER_ID') and application_id = 514 and query_type like 'ADV_SEARCH_%' and profile_name like 'CSS_514%' ));
Line: 4052

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARAMETER_VALUE from JTF_PERZ_QUERY_PARAM_V xx 
 where (parameter_name in ('CUSTOMER_ID','SR_CUSTOMER_ID') and application_id = 514 and query_type like 'ADV_SEARCH_%' and profile_name like 'CSS_514%' ));
Line: 4059

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_SUPPLIER_ACTIVITIES xx 
 );
Line: 4064

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_SUPPLIER_ACTIVITIES xx 
 );
Line: 4071

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SUPPLIER_TRADING_PARTNER_ID from PON_SUPPLIER_ACCESS xx 
 );
Line: 4076

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SUPPLIER_TRADING_PARTNER_ID from PON_SUPPLIER_ACCESS xx 
 );
Line: 4083

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_PARTY_LINE_EXCLUSIONS xx 
 );
Line: 4088

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_PARTY_LINE_EXCLUSIONS xx 
 );
Line: 4095

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_PF_SUPPLIER_FORMULA xx 
 );
Line: 4100

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_PF_SUPPLIER_FORMULA xx 
 );
Line: 4107

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_CREATED_TP_ID from PON_BID_HEADERS xx 
 );
Line: 4112

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_CREATED_TP_ID from PON_BID_HEADERS xx 
 );
Line: 4119

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORING_PARTY_CONTACT_ID from PON_CONTRACTS xx 
 );
Line: 4124

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORING_PARTY_CONTACT_ID from PON_CONTRACTS xx 
 );
Line: 4131

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORING_PARTY_ID from PON_CONTRACTS xx 
 );
Line: 4136

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORING_PARTY_ID from PON_CONTRACTS xx 
 );
Line: 4143

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.OWNER_PARTY_ID from PON_THREADS xx 
 );
Line: 4148

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.OWNER_PARTY_ID from PON_THREADS xx 
 );
Line: 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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx 
 );
Line: 4160

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.FROM_ID from PON_THREAD_ENTRIES xx 
 );
Line: 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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx 
 );
Line: 4172

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.FROM_COMPANY_ID from PON_THREAD_ENTRIES xx 
 );
Line: 4179

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TO_COMPANY_ID from PON_TE_RECIPIENTS xx 
 );
Line: 4184

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TO_COMPANY_ID from PON_TE_RECIPIENTS xx 
 );
Line: 4191

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_ACK_CONTACT_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4196

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_ACK_CONTACT_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4203

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_ACK_TP_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4208

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_ACK_TP_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4215

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUYER_TP_CONTACT_ID from PON_SUPPLIER_ACCESS xx 
 );
Line: 4220

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BUYER_TP_CONTACT_ID from PON_SUPPLIER_ACCESS xx 
 );
Line: 4227

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_BIDDING_PARTIES xx 
 );
Line: 4232

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_BIDDING_PARTIES xx 
 );
Line: 4239

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.ACK_PARTNER_CONTACT_ID from PON_BIDDING_PARTIES xx 
 );
Line: 4244

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.ACK_PARTNER_CONTACT_ID from PON_BIDDING_PARTIES xx 
 );
Line: 4251

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_OPTIMIZE_CONSTRAINTS xx 
 );
Line: 4256

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_OPTIMIZE_CONSTRAINTS xx 
 );
Line: 4263

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_OPTIMIZE_CONSTRAINTS xx 
 );
Line: 4268

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_OPTIMIZE_CONSTRAINTS xx 
 );
Line: 4275

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4280

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4287

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4292

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_ACKNOWLEDGEMENTS xx 
 );
Line: 4299

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_AUCTION_SUMMARY xx 
 );
Line: 4304

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_AUCTION_SUMMARY xx 
 );
Line: 4311

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_AUCTION_SUMMARY xx 
 );
Line: 4316

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_AUCTION_SUMMARY xx 
 );
Line: 4323

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_SUPPLIER_ACTIVITIES xx 
 );
Line: 4328

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_SUPPLIER_ACTIVITIES xx 
 );
Line: 4335

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_LOCKED_BY_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4340

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_LOCKED_BY_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4347

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_UNLOCKED_BY_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4352

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_UNLOCKED_BY_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4359

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SCORING_LOCK_TP_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4364

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SCORING_LOCK_TP_CONTACT_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4371

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4376

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_ID from PON_AUCTION_HEADERS_ALL xx 
 );
Line: 4383

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_AUCTION_EVENTS xx 
 );
Line: 4388

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.TRADING_PARTNER_CONTACT_ID from PON_AUCTION_EVENTS xx 
 );
Line: 4395

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_CREATED_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4400

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SURROG_BID_CREATED_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4407

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SCORE_OVERRIDE_TP_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4412

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SCORE_OVERRIDE_TP_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4419

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHORTLIST_TPC_ID from PON_BID_HEADERS xx 
 );
Line: 4424

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHORTLIST_TPC_ID from PON_BID_HEADERS xx 
 );
Line: 4431

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_UNLOCKED_BY_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4436

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_UNLOCKED_BY_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4443

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 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_LOCKED_BY_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4448

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.DRAFT_LOCKED_BY_CONTACT_ID from PON_BID_HEADERS xx 
 );
Line: 4455

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.INT_ID from OKL_INS_POLICIES_ALL_B xx 
 where (IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4460

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.INT_ID from OKL_INS_POLICIES_ALL_B xx 
 where (IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4467

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.AGENT_SITE_ID from OKL_INS_POLICIES_ALL_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4477

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.AGENT_SITE_ID from OKL_INS_POLICIES_ALL_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4489

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AGENCY_SITE_ID from OKL_INS_POLICIES_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4499

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AGENCY_SITE_ID from OKL_INS_POLICIES_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4511

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AGENCY_SITE_ID from OKL_INS_POLICIES_ALL_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4521

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AGENCY_SITE_ID from OKL_INS_POLICIES_ALL_B
 yy 
 where IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4533

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.ISU_ID from OKL_INS_POLICIES_ALL_B xx 
 where (IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4538

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.ISU_ID from OKL_INS_POLICIES_ALL_B xx 
 where (IPY_TYPE = 'THIRD_PARTY_POLICY'));
Line: 4545

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.OBJECT1_ID1 from OKC_K_PARTY_ROLES_B
 yy 
 where JTOT_OBJECT1_CODE = 'OKL_PARTYSITE' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4555

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.OBJECT1_ID1 from OKC_K_PARTY_ROLES_B
 yy 
 where JTOT_OBJECT1_CODE = 'OKL_PARTYSITE' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4567

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.OBJECT1_ID1 from OKC_K_PARTY_ROLES_B xx 
 where (JTOT_OBJECT1_CODE = 'OKX_PARTY' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4572

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.OBJECT1_ID1 from OKC_K_PARTY_ROLES_B xx 
 where (JTOT_OBJECT1_CODE = 'OKX_PARTY' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4579

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID1_OLD from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4584

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID1_OLD from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4591

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID2_OLD from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4596

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID2_OLD from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4603

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PROSPECT_ADDRESS_ID from OKL_LEASE_APPS_ALL_B
 yy 
));
Line: 4613

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PROSPECT_ADDRESS_ID from OKL_LEASE_APPS_ALL_B
 yy 
));
Line: 4625

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PROSPECT_ADDRESS_ID from OKL_LEASE_OPPS_ALL_B
 yy 
));
Line: 4635

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PROSPECT_ADDRESS_ID from OKL_LEASE_OPPS_ALL_B
 yy 
));
Line: 4647

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OKL_TAX_SOURCES xx 
 );
Line: 4652

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OKL_TAX_SOURCES xx 
 );
Line: 4659

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_PARTY_SITE_ID from OKL_TAX_SOURCES
 yy 
));
Line: 4669

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_PARTY_SITE_ID from OKL_TAX_SOURCES
 yy 
));
Line: 4681

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OKL_TAX_SOURCES xx 
 );
Line: 4686

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OKL_TAX_SOURCES xx 
 );
Line: 4693

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_PARTY_SITE_ID from OKL_TAX_SOURCES
 yy 
));
Line: 4703

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_PARTY_SITE_ID from OKL_TAX_SOURCES
 yy 
));
Line: 4715

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OKL_TAX_SOURCES_T xx 
 );
Line: 4720

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from OKL_TAX_SOURCES_T xx 
 );
Line: 4727

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_PARTY_SITE_ID from OKL_TAX_SOURCES_T
 yy 
));
Line: 4737

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_PARTY_SITE_ID from OKL_TAX_SOURCES_T
 yy 
));
Line: 4749

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OKL_TAX_SOURCES_T xx 
 );
Line: 4754

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from OKL_TAX_SOURCES_T xx 
 );
Line: 4761

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_PARTY_SITE_ID from OKL_TAX_SOURCES_T
 yy 
));
Line: 4771

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_PARTY_SITE_ID from OKL_TAX_SOURCES_T
 yy 
));
Line: 4783

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_OBJECT_ID1 from OKL_TERMNT_INTF_PTY xx 
 where (PARTY_OBJECT_CODE = 'OKX_PARTY'));
Line: 4788

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_OBJECT_ID1 from OKL_TERMNT_INTF_PTY xx 
 where (PARTY_OBJECT_CODE = 'OKX_PARTY'));
Line: 4795

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID2_NEW from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4800

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID2_NEW from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4807

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.OBJECT1_ID1 from OKC_RULES_B
 yy 
 where JTOT_OBJECT1_CODE = 'OKL_PARTYSITE' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4817

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.OBJECT1_ID1 from OKC_RULES_B
 yy 
 where JTOT_OBJECT1_CODE = 'OKL_PARTYSITE' AND DNZ_CHR_ID IN (SELECT ID FROM OKL_K_HEADERS)));
Line: 4829

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID1_NEW from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4834

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_REL_ID1_NEW from OKL_TRX_CONTRACTS_ALL xx 
 );
Line: 4841

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_CUST_ACCOUNTS
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.CUST_ACCOUNT_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_ID from OKL_EXT_SELL_INVS_ALL_B
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.SELLING_PARTY_ID from HZ_CUST_ACCOUNTS
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.CUST_ACCOUNT_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_ID from OKL_EXT_SELL_INVS_ALL_B
 yy 
));
Line: 4858

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_CUST_ACCOUNTS
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.CUST_ACCOUNT_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_ID from OKL_EXT_SELL_INVS_ALL_B
 yy 
))
 or  temp.party_id  in (select /*+ parallel (xx)*/ xx.SELLING_PARTY_ID from HZ_CUST_ACCOUNTS
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.CUST_ACCOUNT_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_ID from OKL_EXT_SELL_INVS_ALL_B
 yy 
));
Line: 4877

insert into hz_application_trans_gt(app_id,party_id) select 540, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 540 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OKL_OPEN_INT_ALL xx 
 );
Line: 4882

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from OKL_OPEN_INT_ALL xx 
 );
Line: 4889

insert into hz_application_trans_gt(app_id,party_id) select 200, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 200 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from PO_VENDORS xx 
 );
Line: 4894

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from PO_VENDORS xx 
 );
Line: 4901

insert into hz_application_trans_gt(app_id,party_id) select 200, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 200 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from PO_VENDOR_SITES_ALL
 yy 
));
Line: 4911

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from PO_VENDOR_SITES_ALL
 yy 
));
Line: 4923

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SITE_CATEGORY_OBJECT_ID from AMS_IBA_PL_SITES_B xx 
 where (SITE_CATEGORY_TYPE = 'AFFILIATES'));
Line: 4928

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SITE_CATEGORY_OBJECT_ID from AMS_IBA_PL_SITES_B xx 
 where (SITE_CATEGORY_TYPE = 'AFFILIATES'));
Line: 4935

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_PARTY_MARKET_SEGMENTS xx 
 );
Line: 4940

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_PARTY_MARKET_SEGMENTS xx 
 );
Line: 4947

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.COORDINATOR_ID from AMS_AGENDAS_B xx 
 );
Line: 4952

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.COORDINATOR_ID from AMS_AGENDAS_B xx 
 );
Line: 4959

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_CHANNEL_SUMMARY xx 
 );
Line: 4964

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_CHANNEL_SUMMARY xx 
 );
Line: 4971

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_CONTACTS xx 
 );
Line: 4976

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_CONTACTS xx 
 );
Line: 4983

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_PRVW_CONTACTS xx 
 );
Line: 4988

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_PRVW_CONTACTS xx 
 );
Line: 4995

insert into hz_application_trans_gt(app_id,party_id) select 530, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 530 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_PRVW_FTG_DTLS xx 
 );
Line: 5000

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from AMS_TCOP_PRVW_FTG_DTLS xx 
 );
Line: 5007

insert into hz_application_trans_gt(app_id,party_id) select 511, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 511 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from CSC_CUST_PLANS xx 
 );
Line: 5012

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from CSC_CUST_PLANS xx 
 );
Line: 5019

insert into hz_application_trans_gt(app_id,party_id) select 716, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 716 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.FACILITY_CONTACT_ID from FTE_LOCATION_PARAMETERS xx 
 );
Line: 5024

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.FACILITY_CONTACT_ID from FTE_LOCATION_PARAMETERS xx 
 );
Line: 5031

insert into hz_application_trans_gt(app_id,party_id) select 690, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 690 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from JTF_FM_PROCESSED_V xx 
 );
Line: 5036

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from JTF_FM_PROCESSED_V xx 
 );
Line: 5043

insert into hz_application_trans_gt(app_id,party_id) select 690, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 690 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from JTF_FM_CONTENT_HISTORY_V xx 
 );
Line: 5048

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from JTF_FM_CONTENT_HISTORY_V xx 
 );
Line: 5055

insert into hz_application_trans_gt(app_id,party_id) select 515, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 515 and appl.party_id=temp.party_id) and 

 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.QUALIFIER_ATTR_VALUE from OKS_QUALIFIERS xx 
 where ((qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE1'  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute ='QUALIFIER_ATTRIBUTE16'  OR qualifier_context = 'CUSTOMER_GROUP' AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE3'  OR qualifier_context = 'PARTY' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))));
Line: 5060

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 to_char(temp.party_id)  in (select /*+ parallel(xx)*/ xx.QUALIFIER_ATTR_VALUE from OKS_QUALIFIERS xx 
 where ((qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE1'  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute ='QUALIFIER_ATTRIBUTE16'  OR qualifier_context = 'CUSTOMER_GROUP' AND qualifier_attribute = 'QUALIFIER_ATTRIBUTE3'  OR qualifier_context = 'PARTY' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE1', 'QUALIFIER_ATTRIBUTE2'))));
Line: 5067

insert into hz_application_trans_gt(app_id,party_id) select 515, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 515 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.QUALIFIER_ATTR_VALUE from OKS_QUALIFIERS
 yy 
 where (qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 5077

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  to_char(xx.PARTY_SITE_ID)
 in (select /*+ parallel(yy)*/ yy.QUALIFIER_ATTR_VALUE from OKS_QUALIFIERS
 yy 
 where (qualifier_context = 'ASOPARTYINFO'  AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE10','QUALIFIER_ATTRIBUTE11')  OR qualifier_context = 'CUSTOMER' AND qualifier_attribute IN ('QUALIFIER_ATTRIBUTE17', 'QUALIFIER_ATTRIBUTE18'))));
Line: 5089

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from CS_ESTIMATE_DETAILS xx 
 );
Line: 5094

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from CS_ESTIMATE_DETAILS xx 
 );
Line: 5101

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from CS_ESTIMATE_DETAILS xx 
 );
Line: 5106

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from CS_ESTIMATE_DETAILS xx 
 );
Line: 5113

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5123

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5135

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SITE_ID from CS_INCIDENTS_AUDIT_B
 yy 
));
Line: 5145

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SITE_ID from CS_INCIDENTS_AUDIT_B
 yy 
));
Line: 5157

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5167

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.BILL_TO_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5179

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5189

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.SHIP_TO_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5201

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5211

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5223

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_ID from CS_INCIDENTS_AUDIT_B xx 
 );
Line: 5228

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_ID from CS_INCIDENTS_AUDIT_B xx 
 );
Line: 5235

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5240

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_PARTY_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5247

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5252

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_PARTY_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5259

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.VALUE_OBJECT_ID from CS_CHG_SUB_RESTRICTIONS xx 
 );
Line: 5264

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.VALUE_OBJECT_ID from CS_CHG_SUB_RESTRICTIONS xx 
 );
Line: 5271

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5276

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.BILL_TO_CONTACT_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5283

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5288

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.SHIP_TO_CONTACT_ID from CS_INCIDENTS_ALL_B xx 
 );
Line: 5295

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5305

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.CUSTOMER_SITE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5317

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_USE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5327

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INSTALL_SITE_USE_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5339

insert into hz_application_trans_gt(app_id,party_id) select 170, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 170 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INCIDENT_LOCATION_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5349

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.INCIDENT_LOCATION_ID from CS_INCIDENTS_ALL_B
 yy 
));
Line: 5361

insert into hz_application_trans_gt(app_id,party_id) select 174, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 174 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from ECX_TP_HEADERS
 yy 
));
Line: 5371

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.PARTY_SITE_ID from ECX_TP_HEADERS
 yy 
));
Line: 5383

insert into hz_application_trans_gt(app_id,party_id) select 204, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 204 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.ISSUING_AUTHORITY_ID from XLE_REGISTRATIONS xx 
 );
Line: 5388

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.ISSUING_AUTHORITY_ID from XLE_REGISTRATIONS xx 
 );
Line: 5395

insert into hz_application_trans_gt(app_id,party_id) select 204, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 204 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORITY_ID from XLE_REG_FUNCTIONS xx 
 );
Line: 5400

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.AUTHORITY_ID from XLE_REG_FUNCTIONS xx 
 );
Line: 5407

insert into hz_application_trans_gt(app_id,party_id) select 204, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 204 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.ISSUING_AUTHORITY_SITE_ID from XLE_REGISTRATIONS
 yy 
));
Line: 5417

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.ISSUING_AUTHORITY_SITE_ID from XLE_REGISTRATIONS
 yy 
));
Line: 5429

insert into hz_application_trans_gt(app_id,party_id) select 204, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 204 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AUTHORITY_SITE_ID from XLE_REG_FUNCTIONS
 yy 
));
Line: 5439

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel (xx)*/ xx.PARTY_ID from HZ_PARTY_SITES
 xx 
 where (nvl(STATUS, 'A') in ('A','I'))
 and  xx.PARTY_SITE_ID 
 in (select /*+ parallel(yy)*/ yy.AUTHORITY_SITE_ID from XLE_REG_FUNCTIONS
 yy 
));
Line: 5451

insert into hz_application_trans_gt(app_id,party_id) select 666, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 666 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBW_PAGE_VIEWS xx 
 );
Line: 5456

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_ID from IBW_PAGE_VIEWS xx 
 );
Line: 5463

insert into hz_application_trans_gt(app_id,party_id) select 666, temp.party_id from hz_purge_gt temp  where not exists(select 'Y' from hz_application_trans_gt appl where appl.app_id = 666 and appl.party_id=temp.party_id) and 

 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_RELATIONSHIP_ID from IBW_PAGE_VIEWS xx 
 );
Line: 5468

delete /*+ parallel(temp) */ from hz_purge_gt temp where 
 temp.party_id  in (select /*+ parallel(xx)*/ xx.PARTY_RELATIONSHIP_ID from IBW_PAGE_VIEWS xx 
 );
Line: 5473

delete from hz_purge_gt temp where temp.party_id in (select appl.party_id from hz_application_trans_gt appl) ;