Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 08 Mar 2004 @ 11:04:32 GMT


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


Subj:   Will the 2 SQLs return the same values....
 
From:   Anomy Anom

<-- Anonymously Posted: Monday, March 08, 2004 02:16 -->

Is there any difference in the 2 SQLs.

The problem is that in the 1st SQL, I got only 2 Values for Service and the whole action happens on just 2 AMPS and it becomes skewed.

I then changed it to be a SubQuery. Are they both the same.

SELECT ast.id, max(wm.stat) AS codes
   FROM  ast  LEFT OUTER JOIN  wm
     ON
 ast.id = '0000'
 AND  ast.service = wm.service ;


SELECT ast.id, max(wm.stat) AS codes
  FROM ast LEFT OUTER JOIN  wm
    ON
ast.id = '0000'
AND ast.service_group in (sel service from wm) ;

Thanks a Million.



     
  <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