Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Jun 2006 @ 18:13:17 GMT


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


Subj:   Re: SQL to Normalize Columns to Rows
 
From:   Fred W Pluebell

Make it UNION ALL (to eliminate the "distinct" that UNION alone implies). The spool file won't include rows where the corresponding column is NULL (and you said most of them ARE null), so this won't be as bad as you fear; it's likely your fastest option in terms of execution.

An "intermediate" solution would be to break up the INSERT/SELECT into multiple statements - as many as one per source data column.

You are correct that cursor processing will be MUCH slower than set processing.

FastExport, FastLoad to a staging table, then INSERT/SELECT to the target is just extra work.



     
  <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