Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 11 Jul 2003 @ 06:49:09 GMT


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


Subj:   Re: Another FastExport and FastLoad question (syntax)
 
From:   Heying, Jerold G

If you are trying to duplicate a table within the same Teradata system, you can create the table and populate it with one simple DDL statement. No FastExport and FastLoad is required. Refer to Teradata SQL Reference - Volume 4 (DDL Statements). Chapter 1 includes "CREATE TABLE (AS clause)" and will do this task as easy as possible.

CREATE TABLE target_table AS
(SELECT *
FROM source_table
)
WITH DATA;

Your new table, target_table will be created with the same column definitions as the existing source_table. The WITH DATA populates your new table with the desired rows. You can modify the subquery to select a subset of columns from the source_table and add a where clause to filter the particular rows to populate the new table!

My first rule in Teradata - Never ever never never ever pull the data out of Teradata when you can do the job with a simple bit of SQL. It will complete in parallel and bypass the network overhead of unloading and reloading the data.


God Luck!

Jerry Heying
Teradata Solution Architect



     
  <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