Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 29 Dec 2008 @ 10:09:36 GMT


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


Subj:   Re: How to Get Count(*) in UNIX Variable
 
From:   Ragavendran Srinivasanmanikandan

Geoffrey Rommel wrote:

  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`

Hi,

I tested the below code. But both COUNT01 and COUNT02 are returning 0.

Please let me know how to proceed.


Regards

Ragavendran S



     
  <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