Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

SQL to pull data - response (5) by Qaisar Aftab Kiani

$
0
0
Kumar, You can get the records from dbc.columns but you will have to join the table dbc.table to filter out the views and tables by putting the condition dbc.tables.tablekind = 'T' otherwise the queries will contain the views as well. The query I provided will dynamically generate the SQL for your requirements relying on the information available in dbc.taables table. After executing the query, the answerset will contain the set of SQLs UNIONED together and you can execute those queries to get your final result.

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>