Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 16 Jul 2003 @ 09:44:06 GMT


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


Subj:   Re: Check rowcount in bteq utility
 
From:   Herd, Stuart

A count(*) with no extras will always give you one row (even if it's just telling you that you have a count of 0).

You could try

SELECT COUNT(*)
FROM database.table
HAVING COUNT(*) >= 1;

This will set ACTIVITYCOUNT to 1 for non-zero rowcounts and to 0 for zero rowcounts, and give you (hopefully) more readable output than the other option, select * from database.table.


Regards,

Stuart



     
  <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