Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outer Join Coding

Status
Not open for further replies.

BillDHS

Programmer
Apr 26, 2001
207
US
We have multiple applications that we use to access TD through ODBC. Whenever a left outer join is created the qualifier on the right table is coded in the WHERE clause instead of the ON clause, in effect creating an inner join. Is this a function of the Application's interpretation of the selection criteria, or of the ODBC driver?

Select xxx,yyy from table1 LEFT OUTER JOIN table2
ON table1.a = table2.a
AND table2.b = zzz

WHERE table1.b = qqq;

Is submitted to TD as
Select xxx,yyy from table1 LEFT OUTER JOIN table2
ON table1.a = table2.a

WHERE table1.b = qqq
AND table2.b = zzz;
 
Hi,
I remember of problem like this many years ago with an old version of the ODBC driver... check that you using the latest version.

Also, you don't mention the application that generates the SQL... it could be this that's at fault.

For Example, a poorly coded Busines Objects universe could be causing your problem.

Roger...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top