Database info in one query

Database

Database info in one query

I want to get the inforation about datawarehouse.
In that I want to see table name in datawarehouse and the row count.
I can get all the tables name from dbc.tables,which is sys table, but not able to get the count .

any idea.

Regards,
gander_ss
3 REPLIES

Re: Database info in one query

SELECT 'SELECT COUNT(*) FROM '||trim(tablename)|| ';' from dbc.tables
where databaseName=name_of_database and

Please use this

The run all the counts for the table using the sql assistant

Re: Database info in one query

Hi ,

I have tried this query.
But this query is not giving the table name and counts.
The o/p loks like this :

SELECT COUNT(*) FROM table_a;
SELECT COUNT(*) FROM table_b;
SELECT COUNT(*) FROM table_c;

please suggest.

Regards,
gander_ss

Re: Database info in one query

Refer this thread .....

http://www.teradata.com/teradataForum/shwmessage.aspx?forumid=9&messageid=7274