Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: spool command doesn't work
"Gary Dickinson" <garyd00_at_home.com> wrote in message news:<seYT6.394080$166.8450655_at_news1.rdc1.bc.home.com>...
> Hi again. I tried the suggestions in the replies and the script still
> doesn't work. This has been stumping me all day. Please help.
>
> Thanks again
>
> Gary
>
> Gary Dickinson <gd_at_interchange.ubc.ca> wrote in message
> news:9fog0o$ih$1_at_nntp.itservices.ubc.ca...
> > Hi. I'm having problems spooling my output to a file. Here's the code i
> > have (it's a little crude but it works).
> >
> > spool data
> > ....<SQL statement deleted>
> > spool off
> > /
> >
> > When I run the script, I get the error:
> >
> > ERROR at line 1:
> > ORA-00900: invalid SQL statement
> >
> > This has been stumping me. I'm a rookie at SQL. Any help would be
> > appreciated.
Two suggestions. First, make very sure the statement actually works. I think you said it did but copy and paste it into a script then execute it, without the spool commands.
I think the problem is the '/'. That tells SQL*PLUS to send everything in the buffer (which includes the spool off command) to the server. The server sees 'spool off' and chokes on it since it is not an SQL command (it's an SQL*PLUS command).
Lose the '/'. Put a semicolon there instead and see what happens.
Jim Lyons Received on Fri Jun 08 2001 - 16:44:15 CDT
![]() |
![]() |