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: Is there BCP like utility for Oracle (to unload data to text file)

Re: Is there BCP like utility for Oracle (to unload data to text file)

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1997/12/02
Message-ID: <6600ru$n4d@bgtnsc01.worldnet.att.net>#1/1

On 1 Dec 1997 20:26:21 GMT, "Sergei Didur" <sergei_didur_at_yahoo.com> wrote:

>I know that SQL Loader could load data from text file, but
>I'd like to unload data from Oracle DB to text file.
>Is it possible ???

There is no SQL*Unloader utility, though I have often wished for one. If you just want to get a comma delimited, or tab-delimited file you can use SQL*Plus. Use the spool command to send the output to a file. You can also use various set commands to get rid of column headings, etc.

To get a comma-delimited file, I usually do something like:

	select '"' || text_field ||'",' || num_field || ',' ...
	from my_table;

Putting the quotes around text fields helps when loading the fields into programs like Excel.



Jonathan Gennick
gennick_at_worldnet.att.net
http://home.att.net/~gennick Received on Tue Dec 02 1997 - 00:00:00 CST

Original text of this message

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