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: Joel Garry <joel-garry_at_home.com>
Date: 3 Aug 2004 14:34:52 -0700
Message-ID: <91884734.0408031334.5a6b0f25@posting.google.com>


"Chris" <cs123._no_spam__at_telstra.com> wrote in message news:<NLMPc.31041$K53.12513_at_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;

Are you sure you want to do this?

SQL> create table jj (tester varchar2(10));

Table created.

SQL> insert into jj values ('xyz,zyx');

1 row created.

SQL> select * from jj;

TESTER



xyz,zyx

jg

--
@home.com is bogus.
One Big Bertha, $499.  Please drive up to the next window. 
http://www.signonsandiego.com/uniontrib/20040803/news_1b3callaway.html
Received on Tue Aug 03 2004 - 16:34:52 CDT

Original text of this message

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