Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 22 Apr 2002 @ 08:02:34 GMT


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


Subj:   Re: More SQL Questions and Concerns
 
From:   Henry Runn

Hi,

You should have AFVCPRO in your last WHERE clause to indentify the rows that you really want.

Now you are only using AQBICLS which has 2 rows in QCLMB001 table and you get either of those two rows in your resultset.

So try this one:

  SELECT  B1.AQBICLS, B1.AFVCPRO, ASEIXXX
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
AND  A1.AFVCPRO=B1.AFVCPRO


     
  <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