|
Archives of the TeradataForumMessage Posted: Thu, 29 Nov 2001 @ 16:58:52 GMT
Scott, If your objective is to capture the DDL for a set of tables (i.e all the tables in a database), Here is what I do: Write SQL that will generate "SHOW TABLE " statements based on the contents of the dictionary and then execute the resulting SHOW TABLE statements. Her is a simple example: SELECT 'SHOW TABLE ' ||TRIM(DATABASENAME) ||'.' ||TRIM(TABLENAME) ||';' (TITLE'') FROM DBC.TABLES WHERE DATABASENAME EQ 'dbname' ; This should generate a collection of SHOW TABLE statements that can then be executed from BTEQ, Queryman, etc. to generate the DDL for each table in the database. We use this a lot to copy the definitions of the production environment tables to the test environment. Regards, Thomas F. Stanek
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||