Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Spool file issue

SOLVED
Go to solution
Dave Walley
Frequent Advisor

Spool file issue

Hi.

When spooling a file from within sqlplus, I get the SQL> prompt in the output, how can I avoid this. I would like the result displayed but neither the query nor SQL prompt included.

I get

SQL> query
123
SQL> spool off

I would like

123



Thanks

Dave
why do i do this to myself
5 REPLIES
A. Clay Stephenson
Acclaimed Contributor

Re: Spool file issue

set echo off;
set heading off;

and often
set verify off;
is also used.
If it ain't broke, I can fix that.
Nicolas Dumeige
Esteemed Contributor

Re: Spool file issue

Hello,

Add "set feedback off"

Cheers

Nicolas
All different, all Unix
Dave Walley
Frequent Advisor

Re: Spool file issue

I should have mentioned that I have set the following also.

SQL> set termout off
SQL> set feedback off
SQL> set pagesize 0
SQL> set heading off
SQL> set verify off
SQL> set echo off
SQL> set linesize 10
SQL> set trimspool on

It must be something else

Dave
why do i do this to myself
Nicolas Dumeige
Esteemed Contributor
Solution

Re: Spool file issue

Some option only apply when you are calling an SQL script.

sqlplus -s / @script

not
sqlplus << EOF
option
spool
select ...
spool off
EOF

Cheers

Nicolas

All different, all Unix
Arturo Galbiati
Esteemed Contributor

Re: Spool file issue

sqlplus <your sets
@sqlcommandfile.sql
exit
!EOF