Outer Joins

Oracle and SQL Server do not have compatible outer join syntax. This can be solved by using the ODBC extended SQL outer join syntax. The Microsoft SQL Server syntax is the same as the ODBC Extended SQL/SQL-92 syntax. The only difference is the {oj    } container.

ODBC Extended SQL
and SQL-92

Oracle

Microsoft SQL Server
SELECT STUDENT.SSN, FNAME, LNAME, CCODE, GRADE
FROM {oj STUDENT LEFT OUTER JOIN GRADE ON STUDENT.SSN = GRADE.SSN}
SELECT SUBSTR(LNAME,1,5)
FROM STUDENT
SELECT SUBSTRING(LNAME,1,5)
FROM STUDENT