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,178
  • 6
  • 18
  • 31
Abhi093
  • 9
  • 1

0 Answers0