Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Jul 2003 @ 12:35:30 GMT


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


Subj:   Re: Moving Data Due to PI Restructuring
 
From:   Geoffrey Rommel

  Will the CREATE TABLE .... WITH DATA , be faster than a Insert/Select?  



It won't be faster; it will take the same amount of time, assuming you specify the same primary index. I would recommend, however, that you create the table first and then insert/select. CREATE TABLE...WITH DATA can sometimes do unexpected things to your column definitions. For instance, did you know that, in the definition shown below, the 'gender' column will be Unicode?

create table mytable
as
(select ...
 ,case
   when source_column = 1  then 'Male'
   when source_column = 2  then 'Female'
   when source_column = 3  then 'Hermaphrodite'
   else 'Unknown'
  end  as gender
 ,...) with data ...;


     
  <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