[Home] [Help]
2344: if(regid_proc = true) then
2345: insert into hz_application_trans_gt(app_id,party_id) select 690, temp.party_id from hz_purge_gt temp where
2346:
2347:
2348: exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID = temp.party_id
2349: )
2350:
2351: or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID = temp.party_id
2352: 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')))
2347:
2348: exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID = temp.party_id
2349: )
2350:
2351: or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID = temp.party_id
2352: 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')))
2353:
2354: or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_CUSTOMER_ID = temp.party_id
2355: )
2380: or exists (select 'Y' from HZ_PARTY_SITES
2381: xx where xx.PARTY_ID = temp.party_id
2382: and (nvl(STATUS, 'A') in ('A','I'))
2383: and exists
2384: (select 'Y' from JTF_TASKS_B
2385: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
2386: ))
2387:
2388: or exists (select 'Y' from HZ_PARTY_SITES
2538: else
2539: delete from hz_purge_gt temp where
2540:
2541:
2542: exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID = temp.party_id
2543: )
2544:
2545: or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID = temp.party_id
2546: 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')))
2541:
2542: exists (select 'Y' from JTF_TASKS_B xx where xx.CUSTOMER_ID = temp.party_id
2543: )
2544:
2545: or exists (select 'Y' from JTF_TASKS_B xx where xx.SOURCE_OBJECT_ID = temp.party_id
2546: 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')))
2547:
2548: or exists (select 'Y' from JTF_TASK_AUDITS_B xx where xx.NEW_CUSTOMER_ID = temp.party_id
2549: )
2574: or exists (select 'Y' from HZ_PARTY_SITES
2575: xx where xx.PARTY_ID = temp.party_id
2576: and (nvl(STATUS, 'A') in ('A','I'))
2577: and exists
2578: (select 'Y' from JTF_TASKS_B
2579: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
2580: ))
2581:
2582: or exists (select 'Y' from HZ_PARTY_SITES