Query Outer Join
Kumar62Nov 10 2009 — edited Nov 10 2009Hello All
SELECT ool.*
FROM oe_order_lines_all ool,
mtl_item_categories mtc,
mtl_category_sets_b mcb ,
mtl_categories mb,
mtl_system_items_b msi
WHERE ool.header_id =2
AND mb.structure_id = mcb.structure_id
AND mtc.category_id = mb.category_id
AND mtc.category_set_id = mcb.category_set_id
AND mtc.organization_id = ool.ship_from_org_id
AND mtc.inventory_item_id = ool.inventory_item_id
AND mtc.category_set_id = 45
AND ool.inventory_item_id = msi.inventory_item_id
AND ool.ship_from_org_id = msi.organization_id
The above query fetches all the rows in oe_order_lines_all whose inventroy_Item id has catergory_set_id as 45.
Now i also need fetch other rows in oe_order_lines_all even if they dont meet the above condition.
Please let me know how do we achieve this.
Regards,
Kumar.