select hp.party_name customer_name,

a1.account_number customer_number,

a3.STATUS site_status,

 SITE_USE_CODE,LOCATION,PRIMARY_FLAG

,PARTY_SITE_NUMBER,A5.ADDRESS1,A5.ADDRESS2,A5.ADDRESS3,A5.ADDRESS4,A5.CITY,A5.POSTAL_CODE,A5.STATE,A5.COUNTRY

 from hz_cust_accounts a1,hz_cust_acct_sites_all a2,

 hz_cust_site_uses_all a3,HZ_PARTY_SITES A4,HZ_LOCATIONS A5,

 hz_parties hp

 where a1.CUST_ACCOUNT_ID=a2.CUST_ACCOUNT_ID

 and a1.party_id=hp.party_id

 and a2.CUST_ACCT_SITE_ID=a3.CUST_ACCT_SITE_ID

 and nvl(A1.STATUS,’A’)=’A’

 and nvl(A3.STATUS,’A’)=’A’

 AND A2.PARTY_SITE_ID=A4.PARTY_SITE_ID

 AND A4.LOCATION_ID=A5.LOCATION_ID

Recent Posts

Start typing and press Enter to search