Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there BCP like utility for Oracle (to unload data to text file)
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.