Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: import data from text file; update existing rows; no delete

Re: import data from text file; update existing rows; no delete

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 15 Dec 2003 21:03:30 +0100
Message-ID: <3fde13a1$0$28679$626a54ce@news.free.fr>

"kaeli" <tiny_one_at_NOSPAM.comcast.net> a écrit dans le message de news:MPG.1a478ca4f0de5578989a02_at_nntp.lucent.com...
> Hi all,
>
> I have a production DB and a test DB. The test DB has a few minor table
> changes like new views, constraint changes, and such, but has old,
> snapshot data. I want to import the real-time data from the production
> DB into the test DB for testing purposes.
>
> I can easily dump the data as text from the production DB and use sqlldr
> to load new data, but duplicate rows are either errors or ignored,
> depending on settings. I want the duplicates to be updated with the new
> data. I cannot use the replace in sqlldr because it cascades many
> constraints and I don't want to update all my tables, just 2. There are
> too many tables to go through the hassle of removing the data from all
> of them and importing it all.
>
> Does anyone know of a way to use either the Oracle import utility or
> sqlldr to import and replace data (without deletion that cascades
> constraints) from either an export file or a text file?
>
> I do not want to import/replace structure, constraints, sequences, etc.
> Only the row data.
>
> Thanks!
>
> --
> --
> ~kaeli~
> Kill one man and you are a murderer. Kill millions and you
> are a conqueror. Kill everyone and you are God.
> http://www.ipwebdesign.net/wildAtHeart
> http://www.ipwebdesign.net/kaelisSpace
>

If you have a 9i version, have a look at external table and merge statement.

Hope this helps
Michel Cadot Received on Mon Dec 15 2003 - 14:03:30 CST

Original text of this message

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