Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query results output - URGENT
you may want quotes around your varchar2s, so combining the two
previous postings gives you
create table myTBL (name varchar2(100), id number)
set pagesize 0
SET colsep ','
set feedback off
spool filename
select ''''||name||'''' , id from mytbl
spool off
In article <38572927.890EE7A8_at_erols.com>,
Jerry Gitomer <jgitomer_at_erols.com> wrote:
> SET colsep ','
> SET pages 0
> SET lines <nnn>
> SET feedback OFF
>
> SPOOL <file_name>.<ext>
>
> SELECT * FROM <table_name>;
>
> SPOOL OFF
>
> hth
> jerry gitomer
>
> Ed Perry wrote:
>
> > I need to output the results of a query (executed in SQLPlus3.3
against
> > Oracle7.3) to a comma-delimited text file. How can this be done?
What
> > is the easiest solution? The query returns about 15 fields of data
for
> > 25,000 records. I am at a client site tomorrow (Dec. 15) and need
this
> > for resolution. Thanks in advance to any/all respondants.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> --
> Once I figured out how to spell DBA I became one
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Dec 15 1999 - 08:21:44 CST
![]() |
![]() |