Oracle EBS AR 客户取数SQL

SELECT acct.cust_account_id,
acct.party_id,
acct.account_number,
party.party_name,
lkp1.meaning party_type,
profile.cust_account_profile_id,
acct.account_name,
party.party_number,
party.category_code,
lkp.meaning category,
party.jgzz_fiscal_code,
party.ATTRIBUTE11
FROM hz_cust_accounts acct,
hz_parties party,
hz_customer_profiles profile,
fnd_lookup_values lkp,
ar_lookups lkp1
WHERE /*acct.cust_account_id = :1
AND*/ acct.party_id = party.party_id
AND acct.cust_account_id = profile.cust_account_id
AND profile.site_use_id IS NULL
AND lkp1.lookup_type = 'PARTY_TYPE'
AND lkp1.lookup_code = party.party_type
AND trunc(SYSDATE) BETWEEN trunc(lkp1.start_date_active) AND nvl(trunc(lkp1.end_date_active),
trunc(SYSDATE))
AND party.category_code = lkp.lookup_code(+)
AND lkp.lookup_type(+) = 'CUSTOMER_CATEGORY'
AND lkp.language(+) = userenv('LANG')
上一篇:CentOS7,安装Tomcat8.5、JDK1.8,并设置开机启动(Linux CentOS Tomcat、JDK+Tomcat、Tomcat开机自启动)


下一篇:2021-03-17