﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / extracting table names given a Column name from different databases / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 16:38:11 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>hi,**Robert's solution will provide you what you want.I have just split up his query since these are huge views.CREATE VOLATILE TABLE DBC_VT AS (SEL DATABASENAME FROM DBC.DATABASESWHERE DATABASENAME NOT IN ('DBC','CRASHDUMPS')          AND DBKIND='U' ) WITH DATA ON COMMIT PRESERVE ROWS ;SEL A.TABLENAMEFROM DBC.COLUMNS A,         DBC_VT VTWHERE A.DATABASENAME = VT.DATABASENAME AND           A.COLUMNNAME = 'ACC_NO' ;HTH,</description><pubDate>Tue, 05 Aug 2008 14:59:51 GMT</pubDate><dc:creator>SN</dc:creator></item><item><title>RE: extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>we can remove the databasename filter and keep only the columnname filter.likeSELECT TABLENAME,DATABASENAME FROM DBC.COLUMNS DBC WHERE DBC.COLUMNname = 'ABC' ;it should give all the databases on a teradata machine.</description><pubDate>Wed, 30 Jul 2008 22:54:27 GMT</pubDate><dc:creator>novice</dc:creator></item><item><title>RE: extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>sorry .... Table Names not the column names ....Thanks</description><pubDate>Wed, 30 Jul 2008 02:24:11 GMT</pubDate><dc:creator>Dileep Banala</dc:creator></item><item><title>RE: extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>yes .... but am sorry that i need that query to be modifiedsuch that it results in fetching the column names from different databases ....Could you pls help me in this regard?Thanks</description><pubDate>Wed, 30 Jul 2008 02:23:10 GMT</pubDate><dc:creator>Dileep Banala</dc:creator></item><item><title>RE: extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>hi,I see that you already posted this query and got the response from Robert F. Brooks.</description><pubDate>Tue, 29 Jul 2008 09:45:15 GMT</pubDate><dc:creator>SN</dc:creator></item><item><title>extracting table names given a Column name from different databases</title><link>http://www.teradata.com/teradataforum/Topic12332-9-1.aspx</link><description>Hi AllSELECT DBC.TABLE_NAME FROM DBC.COLUMNS WHERE DBC.COLUMN = 'ACC_NO' AND DATABASENAME='DB1'The above query will give me the table names from a single database called DB1, but i want the table names from a dev environment which has 1300+ databases.How can i fetch all the table names with a single query in teradata?And also it should not fetch the system tables.....Can anyone help me in this regard?Thanks</description><pubDate>Tue, 29 Jul 2008 08:18:45 GMT</pubDate><dc:creator>Dileep Banala</dc:creator></item></channel></rss>