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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 28 Nov 2001 10:54:28 -0800
Message-ID: <9u3bt40f90@drn.newsguy.com>


In article <p%6N7.85060$JZ3.264240_at_NewsReader>, "David" says...
>
>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.
>

see
http://osi.oracle.com/~tkyte/flat/index.html

><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.
>
>
>
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Wed Nov 28 2001 - 12:54:28 CST

Original text of this message

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