I have the following (partial) DDL FROM/WHERE clause from an ORACLE view that needs to be re-written to use identical DB2 views (this is fictitious code for educational purposes). Note that "(+)" is Oracle right outer join:
FROM ORACLE.EMPLOYEE A,
WHERE A.PID = B.PID(+)
AND B.DIV_CODE = C.DIV_CODE(+)
AND C.STATUS_CODE = 'A'
My question is this: How are multiple outer joins written in DB2 V8 view DDL to accommodate this? I have researched multiple IBM publications to find that only 2 tables are ever outer join'ed in a select clause. I have attempted the following (partial) DB2 DDL in a DB2 view:
DB2.EMPLOYEE RIGHT OUTER JOIN DB2.PID -- 1st outer join
ON DB2.EMPLOYEE.PID = DB2.PID.PID,
DB2.PID RIGHT OUTER JOIN DB2.DIV -- 2nd outer join
ON DB2.PID.DIV_CODE = DB2.DIV.DIV_CODE
DB2.DIV.STATUS_CODE = 'A'
This DDL is obviously incorrect, but can anything like this be done in DB2 V8??
r937-- I very much appreciate your quick response. I'll attempt the code you supplied as soon as possible. The actual view I'm re-writing has 8 outer joins and other joins as well, but I will use your code in my DDL. THANKS.