Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Spool in SQL*Plus without SQL statments
I'm having the most fustrating problem right now.
I'm trying to spool output of a select statement to a csv file.
Originally I had it spooling to a text file with my settings and it
was fine.
In the midst of trying to accomidate a .csv file, I have lost ability
to remove the sql statements from my output. Despite the fact I'm
pretty sure the I put the same settings as before.
I thought set echo off accomplished this but now I'm just completely lost and fustrated (I don't even know what it does in SQP*Plus anymore..setting it on and off does nothing anymore). every search attempt I've made has been futile (which rarely happens...)
My code looks like this:
set linesize 1000
set heading on
set feedback off
set echo off
set trimspool off
set colsep ','
set termout off
set newpage none
spool C:\output.csv
select pet_priceid as Price, location
from pet_price
where pet_priceid > 897800;
spool off
My results look like this:
SQL> select petroleum_priceid as Price updateby
2 from petroleum_price
3 where petroleum_priceid > 897800;
PRICE
UPDATEBY
That above 'SQL> select...' prompt is what I can't for the life of me get rid of. The worst part, is initially this was an easy issue to solve.
ALSO,
If anyone can help me get rid of the '-----' below the table headings
that would be great. This was my next task but obvously never got to
it.
Received on Fri Jun 22 2007 - 13:53:50 CDT