Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 18 Apr 2002 @ 12:19:50 GMT


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


Subj:   SQL Question for all you experts out there
 
From:   Tony Howe

Are the following queries doing the same thing and shouldn't they return the same results??? Because they don't ,but I think they should. Can anyone shed some light on this for me, please help!!

Thanks, Tony.

 First Query (returns two rows)
   SELECT  B1.AQBICLS
   FROM    CPCLMA.QCLMA001 A1,
           (
             SELECT  AQBICLS,AFVCPRO
             FROM    CPCLMB.QCLMB001
             WHERE   ASEIXXX IN ('02024640948','01620099028')
                AND  AFVCPRO IN ('87620','87621','87622')
           ) B1
   WHERE   A1.AQBICLS=B1.AQBICLS

   Second Query (returns no rows)
   SELECT  B1.AQBICLS
   FROM    CPCLMA.QCLMA001 A1,
           (
             SELECT  AQBICLS,AFVCPRO
             FROM    CPCLMB.QCLMB001
             WHERE   ASEIXXX IN ('02024640948','01620099028')
           ) B1
   WHERE   B1.AFVCPRO IN ('87620','87621','87622')
      AND  A1.AQBICLS=B1.AQBICLS


     
  <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