Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 26 Oct 2010 @ 20:18:45 GMT


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


Subj:   Re: Pivot temp table
 
From:   John_Wight

This is a SQL issue - not BTEQ - BTEQ is only a batch environment for SQL - you should be able to do this with SQL Assistant then put the SQL into a BTEQ script if you wish.

A quick look says this is fairly easy. You need to SELECT's from the 'source table' with a UNION ALL pulling them together. Also, you might want to use a ROW_NUMBER function to assign a sequence number to the final result that you SELECT from to add in the sequence number. At least that's the approach I'd try first. You would need a SELECT for each of the *source tables* with UNION ALL pulling them together. I would assume that the columns are all the same in each table (i.e. UNION COMPATIBLE) so you could pull them together.


Hope hits help as a pointer;-)

JK



     
  <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