Home » SQL & PL/SQL » SQL & PL/SQL » not spooling currently error
not spooling currently error [message #12110] Thu, 29 April 2004 09:46 Go to next message
Raquel
Messages: 46
Registered: July 2003
Member
spool 'c:tempdergStats.txt'

spool 'c:tempdergStats.txt'

create table derg1_nomatch as
  select distinct derg1.sw_ident
  from derg1
   MINUS
  select distinct switchtable_curr.SWITCH
  FROM switchtable_curr;

create table derg2_nomatch as
  select distinct derg1.sw_ident
  from derg1
   MINUS
  select distinct switchtable_curr.SWITCH
  FROM switchtable_curr;

create table derg3_nomatch as
  select distinct derg1.sw_ident
  from derg1
   MINUS
  select distinct switchtable_curr.SWITCH
  FROM switchtable_curr;

create table derg4_nomatch as
  select distinct derg1.sw_ident
  from derg1
   MINUS
  select distinct switchtable_curr.SWITCH
  FROM switchtable_curr;

select count(*) from derg1_nomatch ;
select count(*) from derg2_nomatch ;
select count(*) from derg3_nomatch ;
select count(*) from derg4_nomatch ;

spool off;

When I run this script I get an error 'not spooling currently'. Why won't it create the file with the results of my queries?
Re: not spooling currently error [message #12112 is a reply to message #12110] Thu, 29 April 2004 10:39 Go to previous messageGo to next message
sverch
Messages: 582
Registered: December 2000
Senior Member
I am not sure, but try
SQL> spool on
Re: not spooling currently error [message #12131 is a reply to message #12110] Fri, 30 April 2004 04:54 Go to previous messageGo to next message
shoblock
Messages: 325
Registered: April 2004
Senior Member
Remove the quotes from the spool command. Your spool is giving you an error, but it probably goes off the screen before you notice it - "SP2-0332: Cannot create spool file."
Re: not spooling currently error [message #12135 is a reply to message #12112] Fri, 30 April 2004 05:55 Go to previous messageGo to next message
Raquel
Messages: 46
Registered: July 2003
Member
now I get a error message 'ORA-0900: invalid SQL statement'
Re: not spooling currently error [message #463037 is a reply to message #12110] Tue, 29 June 2010 08:35 Go to previous messageGo to next message
Boclive
Messages: 1
Registered: June 2010
Junior Member
I got this error when I ran my script as a user other than "oracle". When I ran it as "oracle", spooler started and file was output. Check environment variables for the sql account you are using.
Re: not spooling currently error [message #463056 is a reply to message #463037] Tue, 29 June 2010 08:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68763
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I bet that 6 years later there are only a couple of skeletons waiting for the answer.

Anyway, thanks for pointing on the access privilege to the spool file/directory.

Regards
Michel
Re: not spooling currently error [message #463066 is a reply to message #463056] Tue, 29 June 2010 10:07 Go to previous message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Michel Cadot wrote on Tue, 29 June 2010 08:58
I bet that 6 years later there are only a couple of skeletons waiting for the answer.




/forum/fa/449/0/


Regards
Ved
Previous Topic: doubt in DECODE functionality with null
Next Topic: decode functionality in DBMS_OUTPUT
Goto Forum:
  


Current Time: Tue Jul 29 06:29:53 CDT 2025