Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Apr 2010 @ 14:36:54 GMT


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


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!



     
  <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