Is there a way to create the following in the SQL statements for DB2?
1. Outer joins in a select statement
2. NVL conditions in triggers
1. iSeries doesn't support full outer joins (just right & left outer joins) but they can be simulated. Here's an example:
SELECT EMPNO, LASTNAME, PROJNO FROM CORPDATA.EMPLOYEE LEFT OUTER JOIN CORPDATA.PROJECT ON EMPNO = RESPEMP WHERE LASTNAME > 'S' UNION (SELECT EMPNO, LASTNAME, PROJNO FROM CORPDATA.PROJECT EXCEPTION JOIN CORPDATA.EMPLOYEE ON EMPNO = RESPEMP WHERE LASTNAME > 'S')
2. Not sure what you mean by NVL in Triggers. If you're referring to the Oracle NVL function, then the DB2 Coalesce function is what you'd want to use in your trigger logic.
MORE INFORMATION ON THIS TOPIC
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: tips, tutorials and more.
Check out this Search400.com Featured Topic: Database issues resolved
Dig Deeper on Oracle on iSeries
Related Q&A from Kent Milligan
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ... Continue Reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ... Continue Reading
IBM did not change the default of the reuse deleted files function to YES for physical files in order to minimize the impact on any existing ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.