0% found this document useful (0 votes)
20 views

Ar Data Upload Query

The document contains a SQL query that selects data from multiple tables and joins them together on common IDs to retrieve party, customer, account, site and location data along with their source references.

Uploaded by

Syed Mustafa
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Ar Data Upload Query

The document contains a SQL query that selects data from multiple tables and joins them together on common IDs to retrieve party, customer, account, site and location data along with their source references.

Uploaded by

Syed Mustafa
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

select

a.party_name PARTY_NAME,
a.orig_system_reference CUST_SOURCE_REF,
b.orig_system_reference ACCT_SOURCE_REF,
c.orig_system_reference SITE_SOURCE_REF,
e.orig_system_reference LOC_SOURCE_REF,
g.orig_system_reference SITE_PURP_REF,
h.orig_system_reference CUST_SITE_REF
from
hz_parties a,
hz_cust_accounts b,
hz_cust_acct_sites_all c,
hz_party_sites d,
hz_locations e,
HZ_CUST_SITE_USES_ALL f,
HZ_ORIG_SYS_REFERENCES g,
HZ_ORIG_SYS_REFERENCES h
where
--a.party_name = 'INALCA ANGOLA COM. GERAL, LDA' and
a.party_id=b.party_id
and b.cust_account_id=c.cust_account_id
and a.party_id=d.party_id
and d.location_id=e.location_id
and d.party_site_id=c.party_site_id
and c.cust_acct_site_id=f.cust_acct_site_id
and f.site_use_id=g.OWNER_TABLE_ID
and d.party_site_id=h.owner_table_id

You might also like