|
Archives of the TeradataForumMessage Posted: Thu, 09 May 2002 @ 14:08:11 GMT
Armin Your souutions don't achieve what I am looking for. 1st solution Your solution will always give the count as 1 as you are grouping by dbc.tablename and each table name is unique. What I want is to see the table name and the count of rows in each table at a glance. select (trim (databasename)||'.'||trim(tablename)) as tablename , count(*) from dbc.tables group by 1 order by 1 2nd Solution This only gives the counts of columns in a table (from dbc.columns)and not the number of rows in a table. select (trim (t.databasename)||'.'||trim(t.tablename)) as tablename, count(*) from dbc.tables t join dbc.columns c on (t.databasename = c.databasename and t.tablename = c.tablename) group by 1 order by 1 Thanks ROHIT REVO
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||