Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Spool

Author  Topic 

neha7.m
Starting Member

1 Post

Posted - 2009-12-11 : 00:40:27
I need to know as to what "spool" in sql does.

I've these statements in spool:

spool <jodname>

--queries

spool off

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-11 : 00:58:48
Spool is not a valid T-SQL statement. Perhaps you aren't use Microsoft SQL Server? If that's the case, then you should know that SQLTeam.com specializes in Microsoft SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-11 : 00:59:16
You could try dbforums.com or try googling for whatever dbms you are using.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2009-12-11 : 03:51:36
Rather marvelously, Google will have told you that it's Oracle by the time you've typed "spool off" -- before you've even hit the enter key.
Go to Top of Page

behrman
Yak Posting Veteran

76 Posts

Posted - 2009-12-15 : 14:41:39
spool [SQL*PLUS]
SQL> spool name_of_file
SQL> spool name_of_file off
SQL> spool name_of_file out
SQL> spool name_of_file create
SQL> spool name_of_file append
SQL> spool name_of_file replace
The three modifiers create, replace and append are improvements that come with Oracle 10g.

RAQ Report: Web-based Excel-like Java reporting tool
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-12-15 : 15:02:05
spool <filename>

Puts the execution of SQL to that file

Spool off stop the "flow"

I hate Oracle



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -