Hi,
I am writing one unix script to get row count of few tables into one sequential file
my script is like this
$ORACLE_HOME/bin/sqlplus -s <<EOF >output.txt
userid/password@databasename
set verify off
set heading off
set feedback off
select count(*) count from tablel where ;
select count(*) count from table2;
select count(*) count from table3;
exit;
EOF
I want the output inoutput.txt file like this
table1 30(record count)
table2 40
table3 50
Can you please help me in gettinh this result
Thanks
What does your output look like right now?
HI,
thanks for you reply, i output looks like
30\(record count\)
40
50
but i need my spooled file shoud be like
table1 : 30 (record count)
table2 : 40
table3 : 50
plz tell me the workaround for the same
Thanks
spmsarada
select 'table1 : ', count(*) count from tablel where ;
select 'table2 : ', count(*) count from table2;
select 'table3 : ', count(*) count from table3;
what will happen if you add the table1, 2, 3 in the select statement ? ( i didnt test it )
but this will work in sybase
Many thanks for your reply. Itkamaraj, it works fine for me ..