码迷,mamicode.com
首页 > 数据库 > 详细

Oracle EBS AR 客户取数SQL

时间:2018-11-23 14:10:42      阅读:423      评论:0      收藏:0      [点我收藏+]

标签:custom   user   div   active   attr   lang   site   acl   env   

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)

 

Oracle EBS AR 客户取数SQL

标签:custom   user   div   active   attr   lang   site   acl   env   

原文地址:https://www.cnblogs.com/jenrry/p/10006883.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!