Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DB2 and OUTER JOIN SYNTAX

0 views
Skip to first unread message

Andy Hallam

unread,
Jul 30, 2001, 11:24:59 AM7/30/01
to
DB 7.1

I am currently porting our C++ ODBC apps from INFORMIX, SQLSERVER and ORACLE
to DB2.

From what I can see DB2 only supports ANSI STANDARD OUTER SYNTAX i.e
...LEFT/RIGHT OUTER JOIN...

i.e:
SELECT Part, StockQty
FROM PartFile
LEFT OUTER JOIN StockFile ON Part = StockPart


Now INFORMIX, SQLSERVER and ORACLE also supply there own native OUTER JOIN
SYNTAX. For example the above SQL can also be written thus.

-- INFORMIX
SELECT Part, StockQty
FROM PartFile, OUTER StockFile
WHERE Part = StockPart

-- SQLSERVER
SELECT Part, StockQty
FROM PartFile, StockFile
WHERE Part *= StockPart

-- ORACLE
SELECT Part, StockQty
FROM PartFile, StockFile
WHERE Part = StockPart(+)


What I need to know is does DB2 also support it's own outer syntax along the
lines of INFORMIX, SQLSERVER and ORACLE ?


Thanks for any info.

Andy.


Serge Rielau

unread,
Jul 30, 2001, 2:44:44 PM7/30/01
to
Nope, and we're proud at it :-)

Cheers
Serge

pm3...@attglobal.net

unread,
Jul 30, 2001, 10:43:19 PM7/30/01
to
Is there a reason you are looking for a non-standard way of coding things?

PM

Andy Hallam

unread,
Aug 2, 2001, 5:17:38 AM8/2/01
to
Basically I'm working with legacy applications and SQL. (Based on INFORMIX
syntax) and writing a parser to implement native outer join syntax is alot
easier...Other than that it means re-writing 5000+ SQL statements...

<pm3...@attglobal.net> wrote in message
news:3B661B47...@attglobal.net...

0 new messages