Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: spool command doesn't work

Re: spool command doesn't work

From: Mike S. <no email>
Date: Thu, 07 Jun 2001 23:45:48 -0700
Message-ID: <rjs0itk5u9u27gonb09n5bg83q90vnaud7@4ax.com>

On Fri, 08 Jun 2001 04:10:00 GMT, "Gary Dickinson" <garyd00_at_home.com> wrote:

Gary,

I don't mean to doubt you, but I think TurkBear's suggestion should work. The semicolons after the spool commands aren't necessary (or harmful), but the one at the end of

      and to_date('&enddate 23:59', 'yyyy/mm/dd hh24:mi'); is critical. Can you verify that the newer version includes this semicolon?

The ORA-00900 probably doesn't result from the spool line, since SQL*PLUS intercepts that command before the SQL parser sees it. You can verify whether the spool command failed by checking for the file "data."

Mike S.
>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
>> select to_char(strikedate,'yyyy/mm/dd hh24:mi'),
>> latitude, longitude,amplitude
>> from ltng_strikes
>> where latitude between '&SouthLatitude' and '&NorthLatitude'
>> and longitude between '&WestLongitude' and '&EastLongitude'
>> and strikedate between
>> to_date('&startdate 00:00', 'yyyy/mm/dd hh24:mi')
>> and to_date('&enddate 23:59', 'yyyy/mm/dd hh24:mi')
>> 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.
>>
>> Thanks
>>
>> Gary
>>
>>
>
Received on Fri Jun 08 2001 - 01:45:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US