SELECT
p.party_id,
a.cust_account_id,
ps.party_site_id,
ps.location_id,
cs.cust_acct_site_id,
csu.site_use_id,
csu.site_use_code,
p.party_name,
l.address1,
l.address2,
l.city,
l.state,
l.postal_code
FROM
hz_parties p,
hz_cust_accounts a,
hz_party_sites ps,
hz_cust_acct_sites_all cs,
hz_cust_site_uses_all csu,
hz_locations l
WHERE
p.party_id = a.party_id
AND
ps.party_id = p.party_id
AND
ps.party_site_id =
cs.party_site_id
AND
cs.cust_account_id =
a.cust_account_id
AND
csu.cust_acct_site_id =
cs.cust_acct_site_id
AND
csu.site_use_code =
'BILL_TO'
AND
ps.location_id =
l.location_id
AND
a.account_number =
'120223';
No comments:
Post a Comment