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: copy certain data from one database to another

Re: copy certain data from one database to another

From: David Nguyen <nguyend4_at_hotmail.com>
Date: 23 Feb 2003 11:41:02 -0800
Message-ID: <9a0092d.0302231141.3a966466@posting.google.com>


Thank you All your answer is greatly appreciated.

David

"Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in message news:<pan.2003.02.23.11.21.52.180892_at_yahoo.com.au>...
> On Sat, 22 Feb 2003 21:56:09 +0000, David Nguyen wrote:
>
> > Hi All,
> >
> > I have another challenge need to ask:
> >
> > I want to copy (or EXP/IMP) 50 rows of data from one table of 1000
> > rows from one database to another DATABASE same table structure but
> > already contain data 500 rows.
> >
> > I don't know if it can be done. If it can what happen if some of the
> > rows is duplicates?
> >
> > Thanks in advance
> >
> > DAVID
>
> Set up a database link between the two databases, and then use the 'insert
> into X select * from Y' syntax to effect the transfer of the rows. The 'Y'
> entry will be in the form of table_name_at_database_link, assuming you are
> issuing the command whilst connected to the destination database.
>
> What happens if there are duplicates? Depends: is there a primary key on
> the destination table? If there is, the duplicates will not be permitted.
> If there isn't, they will be. Disable the primary key if you *want* the
> duplicates, and cleanse the data by hand before attempting to re-enable
> the constraint.
>
> Regards
> HJR
Received on Sun Feb 23 2003 - 13:41:02 CST

Original text of this message

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