Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Dec 2005 @ 18:43:09 GMT


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


Subj:   How to Convert Records into Columns
 
From:   Chakinala, Raju

Hi,

I have the situation that needs to convert the one record into multiple records, for example I am getting employee and his 12 months salary information as one record wise, I need to insert these 12 months salary information as 12 records ( one record for each month) Data in source table:

     EMP_ID  JAN_REV FEB_REV MAR_REV APR_REV MAY_REV JUN_REV JUL_REV AUG_REV ...
        101      100     200     300     400     500     600     700     800 ...

Data Should be in Target Table :

     EMP_ID    MONTH_NO      REVENUE
     101              1          100
     101              2          200
     101              3          300
     101              4          400
     101              5          500
     ...

How do we archive in Teradata using SQL stmt/Query.

Advance thanks for your help


Thanks,

CR



     
  <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