296: or exists (select 'Y' from HZ_PARTY_SITES
297: xx where xx.PARTY_ID = temp.party_id
298: and (nvl(STATUS, 'A') in ('A','I'))
299: and exists
300: (select 'Y' from HZ_CUST_ACCT_SITES_ALL
301: yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
302: and nvl(STATUS, 'A') in ('A','I')))
303:
304: or exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.SELLING_PARTY_ID = temp.party_id
327: or exists (select 'Y' from HZ_PARTY_SITES
328: xx where xx.PARTY_ID = temp.party_id
329: and (nvl(STATUS, 'A') in ('A','I'))
330: and exists
331: (select 'Y' from HZ_CUST_ACCT_SITES_ALL
332: yy where yy.PARTY_SITE_ID=xx.PARTY_SITE_ID
333: and nvl(STATUS, 'A') in ('A','I')))
334:
335: or exists (select 'Y' from HZ_CUST_ACCOUNTS xx where xx.SELLING_PARTY_ID = temp.party_id