|
storing database query in a variable
I am executing a SQL query in Unix Server:
select status,location from user_information where request_id='DS-43720'
In shell script I am writing this query in the below manner:
echo "select status,location from user_information where request_id='DS-43720' ;" >> $directory/info.sql
//(here $directory is my home folder in Unix Server)
echo "EXIT" >> $directory/info.sql
sqlplus -s $sUserId/$sUserPassword@$ORACLE_SID @$directory/info.sql 1>>$directory/info.log 2>>$directory/info.log
Now how do I store those two column values returned in Sql query in a Unix Variable??
|