Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Apr 2008 @ 11:20:05 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023