|
|
Archives of the TeradataForum
Message Posted: Fri, 09 Apr 2010 @ 14:36:54 GMT
Subj: | | Re: Finding data types in views |
|
From: | | Pradip.Bhogal |
You are right...check the attached one.
SEL
'SEL '||
''''||DATABASENAME||''''||','||''''||TABLENAME||''''||','||''''||COLUMNNAME|
|''''||','||' TYPE('||TRIM(COLUMNNAME)||')'||'
'||'FROM '||TRIM(DATABASENAME)||'.'||TRIM(TABLENAME)||' SAMPLE 1;'
(VARCHAR(200))
FROM
(
SEL A.DATABASENAME ,A.TABLENAME ,A.COLUMNNAME
FROM DBC.COLUMNS A
,DBC.TABLES B
WHERE A.DATABASENAME = B.DATABASENAME
AND A.TABLENAME = B.TABLENAME
AND A.DATABASENAME = 'DATABASENAME'
AND TABLEKIND ='V'
) A
ORDER BY 1
Thanks!
| |