Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 17 Jun 2005 @ 09:46:23 GMT


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


Subj:   Back to SQL School
 
From:   Kambhoji, Naveen Ram Prasanna

Hi Gurus,

Does the following queries return the same result?

Obviously not,any explanations for why they wont return the same result is much appreciated

     SELECT CAST(T.EFF_DATE AS VARCHAR(10)) FROM LOAD_TRACKING T
     GROUP BY T.EFF_DATE
     HAVING MAX(T.STAGE) = 3
     ORDER BY T.EFF_DATE DESC;

     SELECT CAST(T.EFF_DATE AS VARCHAR(10)) FROM LOAD_TRACKING T
     WHERE T.STAGE=3
     GROUP BY T.EFF_DATE
     ORDER BY T.EFF_DATE DESC;

TIA



     
  <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