Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle table to flat file?

Re: oracle table to flat file?

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Tue, 3 Aug 2004 06:01:43 +1000
Message-ID: <410e9d7b$0$4754$afc38c87@news.optusnet.com.au>

"hastenthunder" <hastenthunder_at_hotmail.com> wrote in message news:dUwPc.842$Ny6.1779_at_mencken.net.nih.gov...
> Hi,
>
> Can anyone recommend a tool to dump the data from an oracle table to text
> file?
>
> Thanks

SQL*Plus:

spool textfile.txt
select * from scott.emp
spool off

If you want to get rid of column headings, etc., just preface that lot with something like:

set heading off
set trimspool on
set verify off
set feedback off

And so on.

If you'd prefer a CSV, then something like:

spool textfile.csv
select empno ||','||ename||','||sal from scot.emp; spool off

Regards
HJR Received on Mon Aug 02 2004 - 15:01:43 CDT

Original text of this message

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