SELECT acct.account_number
, acct.status Account_Status
, acct.account_established_date
, acct.account_termination_date
, acct.account_activation_date
, party.party_name
, party.status Party_Status
, asite.status account_site_status
, asite.bill_to_flag
, asite.ship_to_flag
, asite.customer_category_code
, psite.party_site_name
, psite.status Party_Site_Status
, psite.start_date_active
, psite.end_date_active
, loc.address1 || ' ' || loc.address2 address
, loc.city
, loc.state
, loc.postal_code
, siteu.site_use_id
, siteu.status Site_usage_status
, siteu.site_use_code
, siteu.primary_flag
, siteu.status site_uses_status
FROM apps.hz_cust_accounts acct
, apps.hz_cust_acct_sites_all asite
, apps.hz_party_sites psite
, apps.hz_locations loc
, apps.hz_cust_site_uses_all siteu
, apps.hz_parties party
WHERE acct.account_number = :account_number /* in single quotes */
AND asite.cust_account_id = acct.cust_account_id
AND asite.party_site_id = psite.party_site_id
AND psite.location_id = loc.location_id
AND siteu.cust_acct_site_id = asite.cust_acct_site_id
AND acct.party_id = party.party_id
Thursday, April 10, 2008
Customer's Addresses and their usage
Labels:
Trading Community Architecture
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment