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!

BOM Query

User910243567Dec 28 2011 — edited Apr 4 2013
Need help in writing a query to fetch all the assembled items. I have requirement as part of which I will pass Item1, Item2, Item3.... need to get all the assembled items which are using all this items (not just one all the items).

Below query is fetching assembly items which are using any one items.

Select * from bom_bill_of_materials bom, bom_inventory_components bic, mtl_system_items_b msib
where bic.component_item_id = msib2.inventory_item_id
AND bom.bill_sequence_id = bic.bill_sequence_id
AND msib.segment1 IN ('Item1','Item2','Item3')

How can modify it to fetch only assembly items which are using all the 3 items.

As the above query 'IN' is acts like OR (condition1 or condition2....)

Thanks for your response
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2013
Added on Dec 28 2011
14 comments
10,832 views