Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 24 Jun 2005 @ 20:40:23 GMT


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


Subj:   Re: SQL to flattening a table
 
From:   Kambhoji, Naveen Ram Prasanna

One possible crude method to achieve this is to use a query like below

     SELECT TBLA.CUST,TBLA.ACCT,TBLA.BAL,
                                     TBLB.ACCT,TBLB.BAL,
                                     TBLC.ACCT,TBLC.BAL
     FROM TBL1 TBLA,
                TBL1 TBLB,
                TBL1 TBLC
     WHERE
     TABLA.CUST=TABLB.CUST AND
     TABLB.CUST=TABLC.CUST AND
     TABLA.ACCT=100 AND
     TABLB.ACCT=200 AND
     TABLC.ACCT=300

Thanks,

Kambhoji.



     
  <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