Using select statement from sql plus with a shell script
411635Sep 9 2004 — edited Sep 10 2004Hiya,
Using a shell script I am trying to access the oracle database using below
. /export/home/oracle/.profile
sqlplus /nolog << EOF
connect usrid/passwd@DatabaseInstance
how do I store the result of a select statement into a variable which can be accessed from the shell script . For eg. suppose I was to do
select count(1) from sample table
and get a value, how do I let the shell script know about this value.
I have some logic residing on the value returned.
Thanks in advance.
Cheers
XXX