Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 27 Feb 2006 @ 16:18:01 GMT


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


Subj:   Re: Latest DDL's .....
 
From:   Anomy Anom

<-- Anonymously Posted: Monday, February 27, 2006 11:20 -->

Use SQL to write SQL, then run that SQL...

     SELECT 'SHOW '||CASE TABLEKIND
                     WHEN 'T' THEN 'TABLE '
                     WHEN 'V' THEN 'VIEW '
                     WHEN 'M' THEN 'MACRO '
                     ELSE ' '
                     END||TRIM(DATABASENAME)||'.'||TRIM(TABLENAME)||';'
     (TITLE '')
       FROM DBC.TABLES
      WHERE DATABASENAME = 'databasename'

Of course, the more types of objects you have in your environment, the more your case statement will grow...



     
  <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