Toad World® Forums

SPOOL with APPEND option

It seems that Toad doesn’t treat SPOOL with APPEND keyword. If I run a script with APPEND option then the requested output is not written into the spool file. Would you give some instruction how to use this feature under Toad?

Thanks.

Works here. I created a text file called c:\spooltest.txt, added a note to self as the first line and then ran the following script using F5

spool
c:\spooltest.txt append

select
*
from scott.emp;

spool
off

On Feb 12, 2016, at 2:13 PM, drbubo20 bounce-urbantamas@toadworld.com wrote:

SPOOL with APPEND option

Thread created by drbubo20
It seems that Toad doesn’t treat SPOOL with APPEND keyword. If I run a script with APPEND option then the requested output is not written into the spool file. Would you give some instruction how to use this feature under Toad?

Thanks.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.

OK,I see your example works correctly, but not mine. Would you check it if I send you offline?

I’m using relative paths for SPOOL file and have a couple of sql scripts in the same directory which uses the same spool file.

Thanks.

Does it work with your relative paths in SQL*Plus?

On Feb 12, 2016, at 2:50 PM, drbubo20 bounce-urbantamas@toadworld.com wrote:

RE: SPOOL with APPEND option

Reply by drbubo20
OK,I see your example works correctly, but not mine. Would you check it if I send you offline?

I’m using relative paths for SPOOL file and have a couple of sql scripts in the same directory which uses the same spool file.

Thanks.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

Yes, because I’m using it for ages. We have to publish our deployment scripts in that way.

Have you searched your computer for the spool file?

In SQLPlus the relative path is not relative to the script path, it’s relative to the working folder. You can see this by launching SQLPlus at command prompt while different folders are the current working directory and calling a script that spools using relative paths. Keep your script location static and change the working directory each time you load SQL*Plus to test. The spool file ends up all over the place. Toad is doing the same thing, but Toad is changing the working directory automatically at times and it may not be apparent what it is. For example, if you have multiple files opened in the editor each time you activate one its folder is set as the current working directory. If you then make a new (blank) tab Toad’s User Files folder is made active. If you then type a script command like “@somefile.sql” and execute it with F5 and if that file spools to the parent folder (using “…”) then you’ll find your spooled output in Toad’s appdata folder. Hopefully all of that made sense, but I suspect if you search for your spooled file you’ll find it somewhere.

Michael