DBA Data[Home] [Help]

VIEW: APPS.AR_CM_BILL_TO_CUST_H_V

Source

View Text - Preformatted

SELECT /*+INDEX(he ar_xla_lines_extract_n1)*/ ca7.account_number cm_bill_cust_account_number ,ca7.customer_type cm_bill_cust_type ,ca7.cust_account_id cm_bill_cust_account_id ,ca7.global_attribute1 cm_bill_cust_global_attr1 ,ca7.global_attribute10 cm_bill_cust_global_attr10 ,ca7.global_attribute12 cm_bill_cust_global_attr12 ,ca7.global_attribute9 cm_bill_cust_global_attr9 ,ca7.global_attribute_category cm_bill_cust_global_attr_cat ,ca7.npa_number cm_bill_cust_npa_number ,p7.category_code cm_bill_cust_cat_code ,loc.city cm_bill_cust_city ,loc.country cm_bill_cust_country ,loc.county cm_bill_cust_county ,p7.group_type cm_bill_cust_group_type ,p7.gsa_indicator_flag cm_bill_cust_gsa_flag ,p7.jgzz_fiscal_code cm_bill_cust_fiscal_code ,p7.known_as cm_bill_cust_alternate_name ,p7.party_id cm_bill_cust_party_id ,SUBSTRB(p7.party_name,1,240) cm_bill_cust_party_name ,p7.party_number cm_bill_cust_party_number ,p7.party_type cm_bill_cust_party_type ,loc.postal_code cm_bill_cust_postal_code ,loc.province cm_bill_cust_province ,loc.state cm_bill_cust_state ,p7.tax_reference cm_bill_cust_tax_reference ,he.ledger_id ledger_id ,he.event_id event_id FROM hz_cust_accounts ca7 ,hz_parties p7 ,ar_xla_lines_extract he ,hz_cust_site_uses su ,hz_cust_acct_sites st ,hz_party_sites p_site ,hz_locations loc WHERE ca7.cust_account_id = he.bill_customer_id AND su.site_use_id = he.bill_site_use_id AND st.cust_acct_site_id = su.cust_acct_site_id AND p_site.party_site_id = st.party_site_id AND loc.location_id = p_site.location_id AND he.level_flag = 'H' AND ca7.party_id = p7.party_id AND he.event_type_code IN ( 'CM_CREATE' , 'CM_UPDATE')
View Text - HTML Formatted

SELECT /*+INDEX(HE AR_XLA_LINES_EXTRACT_N1)*/ CA7.ACCOUNT_NUMBER CM_BILL_CUST_ACCOUNT_NUMBER
, CA7.CUSTOMER_TYPE CM_BILL_CUST_TYPE
, CA7.CUST_ACCOUNT_ID CM_BILL_CUST_ACCOUNT_ID
, CA7.GLOBAL_ATTRIBUTE1 CM_BILL_CUST_GLOBAL_ATTR1
, CA7.GLOBAL_ATTRIBUTE10 CM_BILL_CUST_GLOBAL_ATTR10
, CA7.GLOBAL_ATTRIBUTE12 CM_BILL_CUST_GLOBAL_ATTR12
, CA7.GLOBAL_ATTRIBUTE9 CM_BILL_CUST_GLOBAL_ATTR9
, CA7.GLOBAL_ATTRIBUTE_CATEGORY CM_BILL_CUST_GLOBAL_ATTR_CAT
, CA7.NPA_NUMBER CM_BILL_CUST_NPA_NUMBER
, P7.CATEGORY_CODE CM_BILL_CUST_CAT_CODE
, LOC.CITY CM_BILL_CUST_CITY
, LOC.COUNTRY CM_BILL_CUST_COUNTRY
, LOC.COUNTY CM_BILL_CUST_COUNTY
, P7.GROUP_TYPE CM_BILL_CUST_GROUP_TYPE
, P7.GSA_INDICATOR_FLAG CM_BILL_CUST_GSA_FLAG
, P7.JGZZ_FISCAL_CODE CM_BILL_CUST_FISCAL_CODE
, P7.KNOWN_AS CM_BILL_CUST_ALTERNATE_NAME
, P7.PARTY_ID CM_BILL_CUST_PARTY_ID
, SUBSTRB(P7.PARTY_NAME
, 1
, 240) CM_BILL_CUST_PARTY_NAME
, P7.PARTY_NUMBER CM_BILL_CUST_PARTY_NUMBER
, P7.PARTY_TYPE CM_BILL_CUST_PARTY_TYPE
, LOC.POSTAL_CODE CM_BILL_CUST_POSTAL_CODE
, LOC.PROVINCE CM_BILL_CUST_PROVINCE
, LOC.STATE CM_BILL_CUST_STATE
, P7.TAX_REFERENCE CM_BILL_CUST_TAX_REFERENCE
, HE.LEDGER_ID LEDGER_ID
, HE.EVENT_ID EVENT_ID
FROM HZ_CUST_ACCOUNTS CA7
, HZ_PARTIES P7
, AR_XLA_LINES_EXTRACT HE
, HZ_CUST_SITE_USES SU
, HZ_CUST_ACCT_SITES ST
, HZ_PARTY_SITES P_SITE
, HZ_LOCATIONS LOC
WHERE CA7.CUST_ACCOUNT_ID = HE.BILL_CUSTOMER_ID
AND SU.SITE_USE_ID = HE.BILL_SITE_USE_ID
AND ST.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
AND P_SITE.PARTY_SITE_ID = ST.PARTY_SITE_ID
AND LOC.LOCATION_ID = P_SITE.LOCATION_ID
AND HE.LEVEL_FLAG = 'H'
AND CA7.PARTY_ID = P7.PARTY_ID
AND HE.EVENT_TYPE_CODE IN ( 'CM_CREATE'
, 'CM_UPDATE')