|
|
Archives of the TeradataForum
Message Posted: Mon, 29 Dec 2008 @ 10:09:36 GMT
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
| |