Link to home
Start Free TrialLog in
Avatar of JDCam
JDCam

asked on

Oracle 10g Left outer Join

Experts,
My query has 3 tables, the third ‘D10’ needs to be a LEFT OUTER to D5.
Giving me problems
In the current syntax, all the D5 fields within the join are not being recognized. “invalid Identifier’

if I remove the left Outer I get fast results, but only where records exist in D10

SELECT
D10.EDI_DATA_ID_VALUE CUST_PART,
D5.ORD_LEV1 VENDOR_PART,
H.ITEM_UPC UPC,
H.ITEM_DES1 DESCR,
D5.ORD_ORD_QTY ORD_QTY,
D5.ORD_SHIP_QTY SHIP_QTY
from e_ord_d5 D5, M_ITEM_H H
LEFT OUTER JOIN E_ORD_D10 D10 ON D5.ORD_LINE_NUM = D10.ORD_LINE_NUM
  AND D5.COMP_CODE = D10.COMP_CODE
  AND D5.ORD_NUM = D10.ORD_NUM  
  AND D10.EDI_DATA_ID_CODE = '2040.N9.02CB'
where D5.COMP_CODE = H.COMP_CODE
AND D5.CUST_CODE = H.CUST_CODE
AND D5.ORD_LEV1 = H.ITEM_CODE
AND D5.comp_code = :p_comp_code and D5.ord_num =:p_ord_num
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JDCam
JDCam

ASKER

Beautiful  Thanks for the explanation
you're welcome

need anything else?
Avatar of JDCam

ASKER

Sorry.... thought I had closed this. thanks again