I'm trying to save a result of a query in a text file, but my spool is not saving the query result, but the query itself. Looking on Stack Overflow I saw a workaround - save a SQL script file and run that script, but it is not working too.
set verify off
set echo off
spool C:\PSR\output.sql
select id_issue
from
mo_test
where
rownum<10;
spool off
@C:\PSR\output.sql
Error starting at line : 1 File @ C:\PSR\output.sql
In command -
SQL> select id_issue
Error report -
Unknown Command
Error starting at line : 2 File @ C:\PSR\output.sql
In command -
from
Error report -
Unknown Command
Error starting at line : 3 File @ C:\PSR\output.sql
In command -
mo_test
Error report -
Unknown Command
...
Software Version from 'About SQL Developer':
Oracle IDE 4.1.5.21.78
JDK 1.8.0_102