Archives of the TeradataForum
Message Posted: Thu, 29 Nov 2001 @ 15:25:47 GMT
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
|