 |
 |
Archives of the TeradataForum
Message Posted: Wed, 30 Apr 2008 @ 11:20:05 GMT
Subj: | | Re: Help in a procedure: Counting rows |
|
From: | | McCall, Glenn David |
Have you considered using SQL to generate an appropriate SQL?
Run this:
select 'select ''' || tablename || ''', count(*) from ' || trim (both
from tablename) || ' union all'
from dbc.tables
where databasename = 'your_db' and
tablekind = 't';
Copy and paste the output into a query tool, delete the final union all and run that. It might even run faster as it has the opportunity
to do some steps in parallel.
Regards
Glenn Mc
| |