| SQL adaptation guide For SQL SERVER 2005, 2008, 2012 / Data manipulation | |
The original OUTER join syntax of Informix® is different from Microsoft™ SQL SERVER outer join syntax:
SELECT ... FROM cust, OUTER(order)
  WHERE cust.key = order.custno
SELECT ... FROM cust, OUTER(order,OUTER(item))
  WHERE cust.key = order.custno
    AND order.key = item.ordno
    AND order.accepted = 1
SELECT ... FROM cust LEFT OUTER JOIN order
                      ON cust.key = order.custno
SELECT ...
  FROM cust LEFT OUTER JOIN order
             ON cust.key = order.custno
             LEFT OUTER JOIN item
             ON order.key = item.ordno
 WHERE order.accepted = 1
SELECT ... FROM a, b WHERE a.key *= b.key
See the SQL SERVER reference manual for a complete description of the syntax.
For better SQL portability, you should use the ANSI outer join syntax instead of the old Informix OUTER syntax.
The Microsoft SQL SERVER interface can convert simple Informix OUTER specifications to Microsoft SQL SERVER ANSI outer joins.
Prerequisites:
Remarks: