Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Jan 2006 @ 09:51:23 GMT


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


Subj:   Re: Differences between queries
 
From:   Vijay R. K.

Hello,

Im sorry for wrongly phrasing the question in the previous mail. The second question was meant to be like below:

What is the difference between the two queries below?

     Sel a.col1, b.col2
     FROM sales_order a
     LEFT OUTER JOIN order_line b
     ON a.order_header_id = b.header_id
     AND a.security_country_code = b.security_country_code
     AND a.order_line_id IS NULL


     Sel a.col1, b.col2
     FROM sales_order a
     LEFT OUTER JOIN order_line b
     ON a.order_header_id = b.header_id
     AND a.security_country_code = b.security_country_code
     WHERE a.order_line_id IS NULL

I see that Teradata makes the Left Outer Join an equi-join when I use a "WHERE a.order_line_id IS NULL" instead of an "WHERE a.order_line_id IS NULL"

In the case above, the second query is bringing back rows only when matching values exist in both columns.


Thanks and Regards

Vijay R K



     
  <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