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
Mahyar Mottaghi Zadeh
  • 1,022
  • 3
  • 16
  • 26
Abhi093
  • 9
  • 1

0 Answers0