0

I am trying to store the SQL query below in a variable within a shell script.

sqlplus -s 'username/password@"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname.com)(PORT=portnumber)))(CONNECT_DATA=(SERVICE_NAME=Servicename)))"' <<EOF
SPOOL /tmp/out.txt
select count(scheduletaskid)from devicetask where status=6 group by coreid;
SPOOL OFF
exit;
EOF
3
  • Or this one : stackoverflow.com/questions/28565623/… Commented Feb 12, 2021 at 8:55
  • what have you tried and what was your problem buddy? Commented Feb 12, 2021 at 9:03
  • Don't use eval! The accepted answer on the duplicate suggests this, but don't trust it just because it is accepted. Commented Feb 12, 2021 at 10:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.