Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: spool command doesn't work
A copy of this was sent to "Gary Dickinson" <gd_at_interchange.ubc.ca> (if that email address didn't require changing) On Thu, 7 Jun 2001 11:11:20 -0700, you wrote:
>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 <<<<<========== that needs to be BELOW the slash
>/
>
spool off <<<<<=== down here.
>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
>
-- Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries Howtos and such: http://asktom.oracle.com/ http://asktom.oracle.com/~tkyte/ Oracle Magazine: http://www.oracle.com/oramag Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Fri Jun 08 2001 - 10:02:19 CDT