码迷,mamicode.com
首页 > 其他好文 > 详细

查询法人实体

时间:2017-07-23 01:02:12      阅读:274      评论:0      收藏:0      [点我收藏+]

标签:default   name   efault   tin   profile   any   contex   order by   _id   

SELECT a.set_of_books_id ledger_id,
gl.name ledger_name,
gl.currency_code,
ffv.flex_value ou_code,
a.name ou_name,
a.organization_id,
a.default_legal_context_id,
b.flex_segment_value,
ffv.flex_value company_code,
ffv.description company_name
FROM hr_operating_units a,
gl_legal_entities_bsvs b,
fnd_flex_values_vl ffv,
fnd_flex_value_sets ffs,
gl_ledgers gl
WHERE a.default_legal_context_id = b.legal_entity_id
AND b.flex_segment_value = ffv.flex_value
AND ffv.flex_value_set_id = ffs.flex_value_set_id
 AND ffs.flex_value_set_name = &company_value_set_name
AND a.set_of_books_id = gl.ledger_id;

SELECT hou.set_of_books_id AS ledger_id,
hou.organization_id,
hou.name AS ou_name,
xep.legal_entity_id AS legal_id,
xep.legal_entity_identifier AS legal_code,
xep.name AS legal_name
FROM hr_operating_units hou, xle_entity_profiles xep
WHERE hou.set_of_books_id = &p_ledger_id
AND hou.default_legal_context_id = xep.legal_entity_id
ORDER BY xep.legal_entity_identifier;

查询法人实体

标签:default   name   efault   tin   profile   any   contex   order by   _id   

原文地址:http://www.cnblogs.com/distanceN/p/7223227.html

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