Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Dec 2008 @ 17:23:46 GMT


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


Subj:   Re: How to Get Count(*) in UNIX Variable
 
From:   Geoffrey Rommel

Try something like this (untested):

     bteq <my-bteq-out
     .logon ...;
     select 'COUNT01', count(*)
       from table01;
     select 'COUNT02', count(*)
       from table02;
     .quit;
     ZZ

     # Store in shell variables
     COUNT1=`grep '^COUNT01' my-bteq-out | cut -c2`
     COUNT2=`grep '^COUNT02' my-bteq-out | cut -c2`


     
  <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