Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Dec 2005 @ 19:31:11 GMT


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


Subj:   Re: How to Convert Records into Columns
 
From:   Mohommod.Khan

One way to do this, using UNION probably, some thing like this:

     SEL
     EMP_ID
     ,'1'
     ,JAN_REV
      FROM table
     UNION
     SEL
     EMP_ID
     ,'2'
     ,FEB_REV
      FROM table
     - - - - - - - - - - - - -

You can also do the same using MLOAD, just write 12 different DML statement and use them on your apply clause but you will need to export all your data to a flat file load it back , this is not SQL.

I am sure there are other ways too.


Hope this helps.

Mohommod



     
  <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