Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 06 Apr 2005 @ 13:08:31 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Outer Join Syntax
 
From:   Hassinger, Bill

We have several "point and click" applications (Access, Crystal reports, BI Query) that we use to access TD through ODBC and WinCli. Whenever a left outer join is submitted the qualifier on the right table is coded in the WHERE clause instead of the ON clause, in effect creating an inner join. When possible we manually edit the SQL for the necessary syntax to get the desired results.

Is this a function of the Application's interpretation of the selection criteria, or processing by the ODBC/WinCli driver?

Desired SQL:

     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;

Bill H



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023