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: HELP: Exporting Data From One Table and Importing to Another

Re: HELP: Exporting Data From One Table and Importing to Another

From: Tony Wang <tonywzt_at_hotmail.com>
Date: Sun, 26 Sep 1999 22:27:39 GMT
Message-ID: <v5xH3.7763$Ll1.1249834@news1.rdc1.on.wave.home.com>


Hi Michael,

I believe the way you specified works, but a quicker solution maybe direcly use SQL statements to migrate data from database A to database B (if there are no LONG RAW data fields):

If what you mean by "Database" is a schema in Oracle, do this:

In SQL Query Worksheet, use the INSERT SQL statement

INSERT INTO A.Table1
(Field1,Field2,.....)
'Omitable
(SELECT column1,Colmn3,Colmn9,Columnx.... FROM B.Table1)

The key is that the sequences of Columns given in the SELECT part must match their conterpart in the INSERT phrase.

If database A and databse B is physically two separate ones that you cannot see both in the SQL Worksheet at the same time, then I prefer to:

1. Export the Tables in A into a dmp file
2. Import all the tables into B
3. Do the INSERT...SELECT to copy data
4. Remove the tables originally in A from B.

Hope this helps,

Tony

Michael Greer <mgreer942_at_prodigy.net> wrote in message news:37EEA3F6.411B94B4_at_prodigy.net...
>
> I need to export all of the data from a table in database A to a table
> in database B. While the table in database B has more columns, it does
> contain all of the columns necessary to import the database A table
> data. However, the column names are not identicle. Therefore, I was
> thinking of using the following process to get this done:
>
> 1) Use MS Access and ODBC to export the table data from database A.
> 2) Rename the columns in Access to match the column names of the target
> table in database B.
> 3) Export the data from Access to the target table in database B.
>
> Will this work? If not, why? This there a simpler more direct process to
> do what I need to do?
>
> Note: The tables are in different databases but located on the same
> server if that makes any difference.
>
>
> --
> Mike Greer
>
> Explore potential income opportunities with Greer and Associates
> at http://www.ibocity.com/greeraa. Also, Come visit my digital
> photography web site along with a lot of other interesting stuff at
> http://www.greer.simplenet.com.
>
>
Received on Sun Sep 26 1999 - 17:27:39 CDT

Original text of this message

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