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: Importing and exporting in a way neutral to Database type

Re: Importing and exporting in a way neutral to Database type

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Thu, 29 Nov 2001 06:11:14 +1100
Message-ID: <3c0536cf$0$10227$afc38c87@news.optusnet.com.au>


Not quite sure why spooling to a tab delimited file is not an option for you, nor why a comma separated file with fields enclosed by double quotes won't do the deed. Both can be handled by SQL Loader easily.

Regards
HJR

--
Resources for Oracle: http://www.hjrdba.com
===============================


"David" <david.wynter_at_btclick.com> wrote in message
news:Nl7N7.85099$JZ3.265004_at_NewsReader...

> Oops, Correction to the mmposting below, I have NOT worked out how to trim
> trailing blanks in a previously exported data file when using SQL*Loader.
>
> David
> "David" <david.wynter_at_btclick.com> wrote in message
> news:p%6N7.85060$JZ3.264240_at_NewsReader...
> > Hello,
> >
> > I have been experimenting with import and export from tables in Oracle
> > 8.1.5. I need to export in a form that allows other brands of Db to
import
> > this data (it is metadata for a Tomcat 4.0 Servlet based application).
> >
> > I used the following script to export.
> >
> > <snip>
> > SET NEWPAGE 0
> > SET SPACE 0
> > SET LINESIZE 3000
> > SET PAGESIZE 0
> > SET ECHO OFF
> > SET FEEDBACK OFF
> > SET HEADING OFF
> > SET COLSEP |
> >
> > SPOOL ID_TABLE.DAT
> > SELECT * FROM ID_TABLE;
> > SPOOL OFF
> >
> > SPOOL RW_DATABASE.DAT
> > SELECT * FROM RW_DATABASE;
> > SPOOL OFF
> > <snip>
> >
> > Now the problem lies with importing I have been able to work out how to
> use
> > SQL*Loader to import these files (using a control file) and in the
process
> > trim all trailing blanks. I find the Oracle documentation fairly
> > impenetratable on control files for SQL*Loader. The reason I use the
pipe
> > symbol ('|') to delineate records is that some of the description
columns
> > have commas.
> >
> > Any suggestions on a control file or a better way to export losing the
> > trailing blanks?
> >
> > Thanks and Regards
> >
> > David Wynter
> > Lone developer at roamware Ltd.
> >
> >
> >
> >
>
>
Received on Wed Nov 28 2001 - 13:11:14 CST

Original text of this message

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