Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sqlplus script in a unix script

francy77Feb 7 2018 — edited Feb 16 2018

Hi all,

i need a way to save in a unix variable a value retrieved from sqlplus;

I saw this example, (from ask tom site), but there is no explanation about what means the -s option

code=`sqlplus -s / << EOF

select max(sal)

from emp

where empno=934;

EOF`

echo $code

I need a very easy example to store a value retrieved from sqlplus to a unix variable in a shell script.

This post has been answered by EdStevens on Feb 7 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2018
Added on Feb 7 2018
18 comments
3,440 views