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: How to REPLACE a unique field?

Re: How to REPLACE a unique field?

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 9 Mar 2004 18:36:26 -0500
Message-ID: <09SdnaJoyrFGidLdRVn-uQ@comcast.com>

"Ramon F Herrera" <ramon_at_conexus.net> wrote in message news:c9bc36ff.0403091531.69bfdcc4_at_posting.google.com...
| (newbie and RTFM question, already tried Google, and wouldn't
| know in what manual page to begin searching, so bear with me)
|
|
| I have a table with a unique field (employee ID).
| Currently, every time a given employee ID is already
| inserted, the next repeated one is rejected and I get
| a "constraint violated" in the log file. What I'd like
| to do is load the data in chronological order, and every
| time a repeteated ID comes along, it should _overwrite_
| the previous one. That way, I will end up most the most
| up-to-date record.
|
| In your answer, feel free to throw in different approaches
| to this problem, if there are multiple solutions!
|
| TIA,
|
| -Ramon F. Herrera

what tool are you using to load the data? (sounds like oracle loader, but please confirm)

what version of the database?

the MERGE (9i) statement may help, but only if you're loading data from a table

;-{ mcs Received on Tue Mar 09 2004 - 17:36:26 CST

Original text of this message

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