Hello,
I've got a sqlplus .sql script in which I use the
SET TERMOUT OFF
instruction, before running a select statement that dynamically creates another
statement, spooled inside another .sql script that I run right away...
I used this SET TERMOUT OFF but this time included in a shell where sqlplus is
invoked as follows:
#!/bin/bash
...
$ORACLE_HOME/bin/sqlplus -s / as sysdba <<EOF
set ver off
... [other instructions]
set termout off
set heading off
spool /tmp/xtmp.sql
select 'select ... from ... where sid='||sid||'... ' from v\$session...;
spool off
@/tmp/xtmp.sql
...
quit
EOF
but this time when running my shell the result of the statement between the two
spool commands gets outputed: why ?? In my .sql file above the dynamic SQL is
not displayed, in my shell script well indeed, I can't understand why...
I would like to get rid of this output: is it possible ?
Thanks a lot for any hint.
Regards,
Seb