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: Exporting to a .csv file

Re: Exporting to a .csv file

From: TurkBear <noone_at_nowhere.com>
Date: Thu, 05 Apr 2001 16:04:09 -0500
Message-ID: <c7npctgdph58t5s7qn2kh9qu9j17oqc5a9@4ax.com>

A search of dejanews may find one for you but basically,

In SqlPLus:
set heading off
set feedback off
set linesize 10000 ( or some large number) set pagesize 0
spool d:\myfiles\table_name.csv
select rtrim(field1)||','||rtrim(field2)||','||.......[ and so on 'till all the fields you want to output have been concatenated with commas between them].... spool off

Its far easier to use a tool ( like Crystal Reports ) that can export in CSV format....

"Jeff Boyer" <jdboyer@(remove)icomproductions.ca> wrote:

>Hello everyone,
>
>Can anyone tell me how to Export my database to a comma separated value
>file. I have done some reading on the net about this but everywhere I go
>they say you need to spool from within SQL*Plus with a custom script, but
>there are no examples of this custom script. Can anyone help me?
>
>Thanks,
>Jeff
>
  Received on Thu Apr 05 2001 - 16:04:09 CDT

Original text of this message

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