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: Exporting ASCII Text file

Re: Exporting ASCII Text file

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Fri, 02 Feb 2001 14:33:22 GMT
Message-ID: <95egfi$uvv$1@nnrp1.deja.com>

In article <lHye6.893$Zp3.90475_at_e3500-chi1.usenetserver.com>,   "Rob Diaz" <rdiaz_at_ebudgets.com> wrote:
> How does one go about exporting an ASCII text file representation of
 a table
> from Oracle 8? (specifically, 8.0.6). We need this file to be able
 to
> import again (eventually) using sql*loader, as well as excel and other
> tools.
>
> Thanks in advance!
> Rob
>

This is easy using sql*plus.

set linesize n where n = longest row
set pagesize 0 suppress headings
set feedback off suppress feedback messages set echo off suppress echoing sql statement to screen spool file_name
select col1 || ',' || col2 || ',' || coln from target_table;
spool off

This will give you a comma or other character delimited file that can be read in with sqlldr for most tables. Tables with LOB or long datatypes will present some problems.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com
http://www.deja.com/
Received on Fri Feb 02 2001 - 08:33:22 CST

Original text of this message

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