Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: oracle table to flat file?
"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