Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 30 Sep 2002 @ 14:39:21 GMT


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


Subj:   Data transposition
 
From:   Burton, Bruce

I'm trying to replicate a SAS Proc Transpose using only Teradata SQL and cannot figure out how to do this. I found some code on the web

www.planet-source-code.com...

using the CUBE operator but teradata does not want to accept the 'with cube' logic. I want to take table #1 below and transpose the phone number as shown in table #2 below:

table #1:

name         account#       phone#

john doe      5551212        123456789
john doe      5551212        012345678
john doe      5551212        001234567

table #2:

name     account#   phone1      phone2     phone3

john doe  5551212    123456789  012345678  001234567

Any ideas or can someone point me to some sample code that would work with teradata?


Thanks,

Bruce



     
  <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