1051: (select 'Y' from AS_SALES_LEAD_CONTACTS
1052: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
1053: ))
1054:
1055: or exists (select 'Y' from HZ_CONTACT_POINTS
1056: xx where xx.OWNER_TABLE_ID = temp.party_id
1057: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1058: and exists
1059: (select 'Y' from AS_SALES_LEAD_CONTACTS
1062: or exists (select 'Y' from HZ_PARTY_SITES
1063: xx where xx.PARTY_ID = temp.party_id
1064: and (nvl(STATUS, 'A') in ('A','I'))
1065: and exists
1066: (select 'Y' from HZ_CONTACT_POINTS
1067: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1068: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1069: and exists
1070: (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))
1260: (select 'Y' from AS_SALES_CREDITS_DENORM
1261: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
1262: ))
1263:
1264: or exists (select 'Y' from HZ_CONTACT_POINTS
1265: xx where xx.OWNER_TABLE_ID = temp.party_id
1266: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1267: and exists
1268: (select 'Y' from AS_LEAD_CONTACTS_ALL
1271: or exists (select 'Y' from HZ_PARTY_SITES
1272: xx where xx.PARTY_ID = temp.party_id
1273: and (nvl(STATUS, 'A') in ('A','I'))
1274: and exists
1275: (select 'Y' from HZ_CONTACT_POINTS
1276: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1277: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1278: and exists
1279: (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))
1339:
1340: or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CNT_PERSON_PARTY_ID = temp.party_id
1341: )
1342:
1343: or exists (select 'Y' from HZ_CONTACT_POINTS
1344: xx where xx.OWNER_TABLE_ID = temp.party_id
1345: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1346: and exists
1347: (select 'Y' from AS_SALES_LEADS
1350: or exists (select 'Y' from HZ_PARTY_SITES
1351: xx where xx.PARTY_ID = temp.party_id
1352: and (nvl(STATUS, 'A') in ('A','I'))
1353: and exists
1354: (select 'Y' from HZ_CONTACT_POINTS
1355: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1356: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1357: and exists
1358: (select 'Y' from AS_SALES_LEADS zz where zz.PRIMARY_CONTACT_PHONE_ID = yy.CONTACT_POINT_ID )))
1370: (select 'Y' from AS_SALES_LEAD_CONTACTS
1371: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
1372: ))
1373:
1374: or exists (select 'Y' from HZ_CONTACT_POINTS
1375: xx where xx.OWNER_TABLE_ID = temp.party_id
1376: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1377: and exists
1378: (select 'Y' from AS_SALES_LEAD_CONTACTS
1381: or exists (select 'Y' from HZ_PARTY_SITES
1382: xx where xx.PARTY_ID = temp.party_id
1383: and (nvl(STATUS, 'A') in ('A','I'))
1384: and exists
1385: (select 'Y' from HZ_CONTACT_POINTS
1386: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1387: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1388: and exists
1389: (select 'Y' from AS_SALES_LEAD_CONTACTS zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))
1579: (select 'Y' from AS_SALES_CREDITS_DENORM
1580: yy where yy.ADDRESS_ID=xx.PARTY_SITE_ID
1581: ))
1582:
1583: or exists (select 'Y' from HZ_CONTACT_POINTS
1584: xx where xx.OWNER_TABLE_ID = temp.party_id
1585: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1586: and exists
1587: (select 'Y' from AS_LEAD_CONTACTS_ALL
1590: or exists (select 'Y' from HZ_PARTY_SITES
1591: xx where xx.PARTY_ID = temp.party_id
1592: and (nvl(STATUS, 'A') in ('A','I'))
1593: and exists
1594: (select 'Y' from HZ_CONTACT_POINTS
1595: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1596: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1597: and exists
1598: (select 'Y' from AS_LEAD_CONTACTS_ALL zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))
1658:
1659: or exists (select 'Y' from AS_SALES_LEADS xx where xx.PRIMARY_CNT_PERSON_PARTY_ID = temp.party_id
1660: )
1661:
1662: or exists (select 'Y' from HZ_CONTACT_POINTS
1663: xx where xx.OWNER_TABLE_ID = temp.party_id
1664: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1665: and exists
1666: (select 'Y' from AS_SALES_LEADS
1669: or exists (select 'Y' from HZ_PARTY_SITES
1670: xx where xx.PARTY_ID = temp.party_id
1671: and (nvl(STATUS, 'A') in ('A','I'))
1672: and exists
1673: (select 'Y' from HZ_CONTACT_POINTS
1674: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1675: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1676: and exists
1677: (select 'Y' from AS_SALES_LEADS zz where zz.PRIMARY_CONTACT_PHONE_ID = yy.CONTACT_POINT_ID )))
1943: (select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
1944: yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
1945: ))
1946:
1947: or exists (select 'Y' from HZ_CONTACT_POINTS
1948: xx where xx.OWNER_TABLE_ID = temp.party_id
1949: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
1950: and exists
1951: (select 'Y' from OKL_RELOCATE_ASTS_ALL_B
1954: or exists (select 'Y' from HZ_PARTY_SITES
1955: xx where xx.PARTY_ID = temp.party_id
1956: and (nvl(STATUS, 'A') in ('A','I'))
1957: and exists
1958: (select 'Y' from HZ_CONTACT_POINTS
1959: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
1960: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
1961: and exists
1962: (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.PAC_ID = yy.CONTACT_POINT_ID )));
2020: (select 'Y' from OKL_TXL_RCPT_APPS_ALL_B
2021: yy where yy.ILE_ID=xx.CUST_ACCOUNT_ID
2022: ))
2023:
2024: or exists (select 'Y' from HZ_CONTACT_POINTS
2025: xx where xx.OWNER_TABLE_ID = temp.party_id
2026: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
2027: and exists
2028: (select 'Y' from OKL_RELOCATE_ASTS_ALL_B
2031: or exists (select 'Y' from HZ_PARTY_SITES
2032: xx where xx.PARTY_ID = temp.party_id
2033: and (nvl(STATUS, 'A') in ('A','I'))
2034: and exists
2035: (select 'Y' from HZ_CONTACT_POINTS
2036: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
2037: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
2038: and exists
2039: (select 'Y' from OKL_RELOCATE_ASTS_ALL_B zz where zz.PAC_ID = yy.CONTACT_POINT_ID )));
2400: (select 'Y' from JTF_TASK_AUDITS_B
2401: yy where yy.OLD_ADDRESS_ID=xx.PARTY_SITE_ID
2402: ))
2403:
2404: or exists (select 'Y' from HZ_CONTACT_POINTS
2405: xx where xx.OWNER_TABLE_ID = temp.party_id
2406: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
2407: and exists
2408: (select 'Y' from JTF_TASK_PHONES
2411: or exists (select 'Y' from HZ_PARTY_SITES
2412: xx where xx.PARTY_ID = temp.party_id
2413: and (nvl(STATUS, 'A') in ('A','I'))
2414: and exists
2415: (select 'Y' from HZ_CONTACT_POINTS
2416: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
2417: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
2418: and exists
2419: (select 'Y' from JTF_TASK_PHONES zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))
2594: (select 'Y' from JTF_TASK_AUDITS_B
2595: yy where yy.OLD_ADDRESS_ID=xx.PARTY_SITE_ID
2596: ))
2597:
2598: or exists (select 'Y' from HZ_CONTACT_POINTS
2599: xx where xx.OWNER_TABLE_ID = temp.party_id
2600: and (OWNER_TABLE_NAME='HZ_PARTIES' AND nvl(STATUS, 'A') in ('A','I'))
2601: and exists
2602: (select 'Y' from JTF_TASK_PHONES
2605: or exists (select 'Y' from HZ_PARTY_SITES
2606: xx where xx.PARTY_ID = temp.party_id
2607: and (nvl(STATUS, 'A') in ('A','I'))
2608: and exists
2609: (select 'Y' from HZ_CONTACT_POINTS
2610: yy where yy.OWNER_TABLE_ID=xx.PARTY_SITE_ID
2611: and OWNER_TABLE_NAME='HZ_PARTY_SITES' AND nvl(STATUS, 'A') in ('A','I')
2612: and exists
2613: (select 'Y' from JTF_TASK_PHONES zz where zz.PHONE_ID = yy.CONTACT_POINT_ID )))