SQL:
select * from mtl_purge_header order by organization_id
SELECT mp.organization_id
,mp.organization_code
,mp.wms_enabled_flag
,nvl(duom.duom_items, 0)
,nvl(prg.prg_lines, 0)
FROM mtl_parameters mp
, ( select organization_id , count(1) duom_items from mtl_system_items_b
where tracking_quantity_ind = 'PS'
group by organization_id) duom
, ( select organization_id, count(1) prg_lines from mtl_purge_header
group by organization_id) prg
where mp.organization_id = duom.organization_id(+)
and mp.organization_id = prg.organization_id(+)
order by 1
本文介绍了一种SQL查询方法,用于从多个表中获取组织的相关参数及其库存情况。主要涉及从mtl_parameters表中选取组织ID、组织代码等信息,并结合mtl_system_items_b表及mtl_purge_header表来统计特定条件下的物品数量。
1752

被折叠的 条评论
为什么被折叠?



