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: using sqlldr to extract the content of table to a file

Re: using sqlldr to extract the content of table to a file

From: joel garry <joel-garry_at_home.com>
Date: 27 Sep 2006 14:37:18 -0700
Message-ID: <1159393038.498116.4750@k70g2000cwa.googlegroups.com>

gazzag wrote:
> Wilfrid wrote:
> > Hello,
> >
> > I am using Oracle 9.2.0.1.
> > I would like to extract the content of a table to a csv file. I am already
> > using a bit sqlldr to load data into the DB and I was wondering if the other
> > way around is possible?
> > Or may be there is another way/tool for doing this.
> > Thanks for your help
> > Wilfrid
>
> >From within SQL*Plus:
>
> SQL> set colsep ,
> SQL> spool <filename>
> SQL> select * from <table_name>;
> SQL> spool off
>
> HTH
> -g

Until you run into those rows where some of the data has commas... and ampersands... and vertical bars... and unprintable characters...

jg

--
@home.com is bogus.
"And the fact that one man - one channel is coming true, makes me feel
really good."
 http://www.firezine.net/issue1/fz1_03.htm
"We let you create your own television programming and then broadcast
it directly to the TV."
http://www.signonsandiego.com/uniontrib/20060927/news_1b27demo.html
Received on Wed Sep 27 2006 - 16:37:18 CDT

Original text of this message

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