Ar Data Upload Query
Ar Data Upload Query
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