Outer Joins
The SQL construct for outer joins varies widely among database vendors. For this reason, the DB Interface Module provides a variety of methods to generate vendor-specific outer join constructs. The major difference between these methods is whether or not they comply with the ANSI SQL 92 syntax. ANSI-compliant outer joins are written as part of the SQL FROM clause; ANSI-noncompliant joins are written as part of the SQL WHERE clause.
You must use ANSI syntax, and write outer joins in the FROM clause, if you use any of the following DB Access Modules:
*DB2 CLI
*Microsoft SQL Server
*PostgreSQL
*ODBC
*MySQL
With the DB Access Modules listed below, you can use either ANSI or non-ANSI syntax. If you use non-ANSI syntax, you must write outer joins in the WHERE clause.
* Oracle OCI
* Sybase Open Client
If you use ODBC or Oracle OCI access modules, please note their unique features:
*The ODBC interface can support either ANSI or non-ANSI syntax, depending on the compliance of the backend database. However, you must use ANSI syntax with the Rogue Wave ODBC access module.
*Oracle OCI supports both ANSI-compliant outer joins and ANSI-noncompliant outer joins using the Oracle join operator (+). Oracle recommends using the ANSI-compliant outer joins in the FROM clause rather than using the join operator in the WHERE clause.
See the appropriate guide for your DB Access Module to determine the supported syntax and other particulars of outer joins. The following two sections demonstrate how an application can generate appropriate outer join syntax for ANSI-compliant databases in the FROM clause, and for ANSI-noncompliant databases in the WHERE clause.