Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 29 Nov 2001 @ 15:25:47 GMT


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


Subj:   Re: Source for DDL in SHOW TABLE
 
From:   Geoffrey Rommel

Tom's statement should read either:

SELECT (CASE TableKind
          when 'T' then 'SHOW TABLE '
          when 'V' then 'SHOW VIEW '
          when 'M' then 'SHOW MACRO '
          when 'P' then 'SHOW PROCEDURE '
        END)
      ||TRIM(DATABASENAME)
      ||'.'
      ||TRIM(TABLENAME)
        ||';'    (TITLE'')
   FROM DBC.TABLES
 WHERE DATABASENAME EQ 'dbname'
;

or:

SELECT 'SHOW TABLE '
      ||TRIM(DATABASENAME)
      ||'.'
      ||TRIM(TABLENAME)
        ||';'    (TITLE'')
   FROM DBC.TABLES
 WHERE DATABASENAME EQ 'dbname'
   AND TABLEKIND = 'T'
;

--wgr



     
  <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