Re: exporting a table to a flat file in .csv format

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Tue, 26 Aug 2003 10:28:12 -0500
Message-ID: <puumkv4ds531ne3hmm5npcemi8ch36bpqa_at_4ax.com>


"Jon" <aaa_at_bbb.ccc> wrote:

>I am trying to dump data from a table to a flat file in .csv format. I have
>read documentation for sqlplus utility but I have not seen any information
>about this apart from defining specific format for columns. Do you know if
>this is posible from sqplus?
>
>Thanks
>
Yes..
Read up on spool and colsep and concatenate in the docs, but in general:

set heading off
set linesize 1000 ( or whatever)
set pagesize 0
set feedback off
set colsep ','
spool 'drive:\path\filename'
select trim(field1)||trim(field2)||trim(field3)........ from your table;

have fun... Received on Tue Aug 26 2003 - 17:28:12 CEST

Original text of this message