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: Chris <cs123._no_spam__at_telstra.com>
Date: Tue, 03 Aug 2004 13:51:41 GMT
Message-ID: <NLMPc.31041$K53.12513@news-server.bigpond.net.au>

"Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:410e9d7b$0$4754$afc38c87_at_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
>
>

or

set colsep ','
select * from emp; Received on Tue Aug 03 2004 - 08:51:41 CDT

Original text of this message

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