All,
I execute a sql select statement from bash script like the below one,
string="user/pass@tns"
tot=`sqlplus -s $string << EOF
set echo off
set feedback off
set head off
select count(*) from test_table;
EOF
`
This assigns total from test_table to shell variable tot. Now i get the below ORA erro when executing this
script
ERROR: ORA-28002: the password will expire within x days
Now the variable tot is assigned with total count from test_table + ERROR: ORA-28002: the password will expire within x days.
I need a way to get only the total rows count alone without any string, will set command help here? or need to go for another way