I am having problems with a table join in a query. Here is the join section
FROM E_ORD_D5D1 D5D1, E_Ord_D7 D7, E_ORD_D5 D5, M_LOC L
WHERE D5.COMP_CODE = :p_comp_code
AND D5.ORD_NUM = :p_ord_num
AND D7.Comp_Code = D5.Comp_Code
AND D7.Ord_Num = D5.Ord_Num
AND D5D1.Comp_Code (+) = D5.Comp_Code
AND D5D1.Ord_Num (+) = D5.Ord_Num
AND D5D1.Ord_Line_Num (+) = D5.Ord_Line_Num
AND D5D1.Ord_Loc_Line_Num (+) > 0
--AND D5D1.Ord_Loc_Qty > 0
--AND D5D1.Whse_Code <> '*'
--AND D5D1.Loc_Code <> '*'
AND L.COMP_CODE = D5.COMP_CODE
AND L.LOC_CODE = D5D1.LOC_CODE
AND L.WHSE_CODE = D5D1.WHSE_CODE
for some records there is no value in D5D1.LOC_CODE.
beacuse of L.LOC_CODE = D5D1.LOC_CODE , the entire row is omitted. I need to keep the row but leave the column blank.
I think I need an outer left join, but I am way over my head here..... can anyone help please