|
|
Archives of the TeradataForum
Message Posted: Wed, 24 Dec 2008 @ 17:23:46 GMT
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`
| |