From: Mark D Powell <markp7832@my-deja.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Exporting ASCII Text file
Date: Fri, 02 Feb 2001 14:33:22 GMT
Organization: Deja.com
Lines: 33
Message-ID: <95egfi$uvv$1@nnrp1.deja.com>
References: <lHye6.893$Zp3.90475@e3500-chi1.usenetserver.com>
NNTP-Posting-Host: 199.228.142.8
X-Article-Creation-Date: Fri Feb 02 14:33:22 2001 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
X-Http-Proxy: 1.0 x59.deja.com:80 (Squid/1.1.22) for client 199.228.142.8
X-MyDeja-Info: XMYDJUIDmarkp7832


In article <lHye6.893$Zp3.90475@e3500-chi1.usenetserver.com>,
  "Rob Diaz" <rdiaz@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/

