Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ODBC Outer Joins

ODBC Outer Joins

From: <acf4cga_at_my-deja.com>
Date: 2000/06/08
Message-ID: <8hnn4o$hu1$1@nnrp1.deja.com>#1/1

Hi all,

    I am converting code which uses SQL Server to full ODBC compliance. There are several SELECT statements in the code which use more than one LEFT OUTER JOIN in a statement.
I have found using MSQuery to construct ODBC SQL that you can only have two tables involved in an OUTER JOIN. However, the SQL which I am converting does LEFT JOINs using more than 2 tables, as follows: SELECT table1.col1 table2.col2 table3.col3 from table1 left join table2 on table1.col1 = table2.col2 left join table3 on table1.col1 = table3.col3

This will not work when using Oracle and MS Access ODBC drivers, I have also tried using the "oj" ODBC escape sequence. From what MSQuery is telling me, it seems that I cannot have more than one LEFT JOIN in an SQL statement when using ODBC. Is this true? (As far as I'm aware LEFT joins are actually LEFT OUTER joins)

If this is the case, how can I produce the same behavoiur without using more than one LEFT JOIN? I want to get all the rows in the table1 all the time but I want to also get rows that match in table2 and table3.

Thanks for any help,

Charles Gamble.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Jun 08 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US