33: if(regid_proc = true) then
34: insert into hz_application_trans_gt(app_id,party_id) select 691, temp.party_id from hz_purge_gt temp where
35:
36:
37: exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_ID = temp.party_id
38: )
39:
40: or exists (select 'Y' from PV_ENTY_ATTR_VALUES xx where xx.ENTITY_ID = temp.party_id
41: )
63:
64: or exists (select 'Y' from PV_PG_MEMBERSHIPS xx where xx.PARTNER_ID = temp.party_id
65: )
66:
67: or exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_PARTY_ID = temp.party_id
68: )
69:
70: or exists (select 'Y' from PV_REFERRALS_B xx where xx.PARTNER_ID = temp.party_id
71: )
132: else
133: delete from hz_purge_gt temp where
134:
135:
136: exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_ID = temp.party_id
137: )
138:
139: or exists (select 'Y' from PV_ENTY_ATTR_VALUES xx where xx.ENTITY_ID = temp.party_id
140: )
162:
163: or exists (select 'Y' from PV_PG_MEMBERSHIPS xx where xx.PARTNER_ID = temp.party_id
164: )
165:
166: or exists (select 'Y' from PV_PARTNER_PROFILES xx where xx.PARTNER_PARTY_ID = temp.party_id
167: )
168:
169: or exists (select 'Y' from PV_REFERRALS_B xx where xx.PARTNER_ID = temp.party_id
170: )