Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 18 Nov 2011 @ 09:43:20 GMT


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


Subj:   Re: How to find the associated tables or view in teradata?
 
From:   Gorner, Tomas

Hi Vijay,

This how TD Administrator does it:

     SELECT DatabaseName,TVMName,TableKind AS "Type"
     FROM dbc.TVM T,dbc.dbase D
     WHERE D.DatabaseId=T.DatabaseId
     AND CreateText LIKE '%"DBC"."DBQLSqlTbl"%' (NOT CS)
     UNION

     SELECT DatabaseName,TVMName,TableKind AS "Type"
     FROM dbc.TextTbl X,dbc.dbase D,dbc.TVM T
     WHERE X.TextType='C'
     AND X.TextString LIKE '%"DBC"."DBQLSqlTbl"%' (NOT CS)
     AND X.DatabaseId=D.DatabaseId
     AND X.TextId=T.TVMId
     MINUS

     SELECT DatabaseName,TVMName,TableKind
     FROM dbc.TVM T,dbc.dbase D
     WHERE D.DatabaseId=T.DatabaseId
     AND DatabaseName='DBC'
     AND TVMName='DBQLSqlTbl'
     ORDER BY 1,2
     ;

Regards,

Tomas



     
  <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