Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Query

user615979Oct 9 2011 — edited Oct 9 2011
Hi,

working on EBS
In this below query the items are not appearing which has no transactions, but we need to show all the items.

I need some help.

select unique msi.segment1
,msi.description
,msi.primary_uom_code
,msi.inventory_item_id
,nvl((select sum(moq.transaction_quantity) from mtl_onhand_quantities moq
where moq.inventory_item_id = msi.inventory_item_id),0) onhand_qty
from mtl_system_items_b msi
,mtl_material_transactions mmt
where msi.inventory_item_id = mmt.inventory_item_id
and msi.organization_id = mmt.organization_id
and nvl((select sum (transaction_quantity)
from mtl_onhand_quantities
where inventory_item_id = msi.inventory_item_id), 0) <> 0
and msi.segment1 like 'APC-RT200005005000'
AND TRUNC (mmt.transaction_date) <= TRUNC (TO_DATE (:p_trans_date,'DD-MON-YYYY'))

Thanks and Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2011
Added on Oct 9 2011
6 comments
1,817 views