I have an sql plus script that uses the SPOOL command to generate a file. I execute it with SQL Developer. When I execute the script, the spool file that is generated only includes the result of the select statement. And that is what I want. But the issue is that when an other user executes the script, it also includes the select-statement itself.
Script:
set pages 0
set lines 32000
set trimspool on
set feedback off
set echo off
set verify off
define vspoolfile = '''c:\temp\spoolfile.txt'''
spool &vspoolfile
select description from query;
spool off
Result in spoolfile.txt:
> select description from query
Te behandelen
Te plannen
I do not want the first line with '> select description from query' in this file. Because the script behaves differently on the other user's machine than on my machine, I think this is maybe a setting in SQL Developer somewhere? Can I force it to not include the statement itself?
Add set term off as well. then, save those commands into a file and run it with the @ command from SQLPlus:
@c:\sqlcmd.sql