Archives of the TeradataForum
Message Posted: Fri, 22 Nov 2002 @ 16:11:49 GMT
Subj: | | Re: Loading a table from another table |
|
From: | | Ahnell, Dave |
My original plan had been to use "Create Table As Select" syntax, but for whatever reason didn't see that syntax in the TD manual. Good
to know it exists. I used "Insert Select" as recommended by several others though and that worked out fine. I was concerned about the
overhead of the inserts, but going into an empty table it didn't matter.
You could load a table from another table's data in two ways, without the use of any tools :
1. If you want to duplicate an existing table with all its data, or need a subset of a table or data from different tables -
accompanied with the table creation : then use the 'CREATE TABLE AS {|}WITH DATA'
2. On the other hand if the table already exists then use INSERT SELECT clause.
The above is possible if the tables exists within the same database or across databases , but on the same box.Across boxes you could use
the utilities like FastLoad, Bteq, FastExport.
|