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

Home -> Community -> Usenet -> c.d.o.misc -> Re: -> Write table data to a text file? How? <-

Re: -> Write table data to a text file? How? <-

From: Stephen Booth <Stephen_at_abooth.demon.co.uk>
Date: 1996/10/25
Message-ID: <846280391snz@abooth.demon.co.uk>#1/1

In article <3270DD3C.4346_at_ibm.net> toyr002_at_ibm.net "Halina Monka" writes:
>
> Les Gainous wrote:
> >
> > To all,
> >
> > What's the best way to write data out to a text file: comma-delimited,
> > tab-separated, or fixed length? I basically need to write out a table
> > into a format usable by other RDMSs/applications. I'm looking for
> > something similar to the Bulk-Copy Program from Sybase or Microsoft SQL
> > Server.
> >
> > Thanks in advance!
> > --
> > Les Gainous, lesgainous_at_earthlink.net
> >
> > Visit my web page at
> > http://home.earthlink.net/~lesgainous
> >
> > Looking for a Client-Server job in California?
> > http://home.earthlink.net/~lesgainous/jobs.html
>
> The common way to dump Oracle table into the text file is to use
> spool command in sqlplus. All sqlplus formatting features may be
> aplied to achieve required format.
> e.g
> spool myfile.txt # this will create operating system file
> # and all output up to sppol off will be captured
> select col1,.....
> from table(s)
> where
> order....
> spool off
>

Thats probably the simplest way, certainly the way I'd use out of choice.

If you want to get down and dirty with PL/SQL, Pro-X (where X is your language choice) and some programming that might be better, depending on exactly what you need (eg automation).

I have a feeling that I read about a version of export (don't know if it was Oracle or 3rd party) that would export as CSV etc.

ODBC to something like Access/Exel &c then export as CSV. Could automate using VB/VBA/VC/VC++ etc.

Just a few ideas.

-- 
Stephen Booth
                                             Home:    stephen_at_abooth.demon.co.uk
                                             Work:    Currrently off line
NB The views expressed in this message are not nessecarily those of my employer
or even any sane person.
Received on Fri Oct 25 1996 - 00:00:00 CDT

Original text of this message

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