Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to REPLACE a unique field?
"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message
news:1078931381.540562_at_yasure...
| Ramon F Herrera wrote:
| > Daniel Morgan <damorgan_at_x.washington.edu> wrote in message
| >
| >>How much data are we talking about and in what version of Oracle?
| >
| >
| > Oracle is 9iR2, soon to be moved to 10g.
| >
| > The input file.dat is 1.1 GB, containing 15 million records.
| > However, after SQL*Loading the data, there are only
| > 115,000 unique records, and each one of them is the FIRST
| > that was seen by sqldr, which may be obsolete. I'd like to
| > have every repeated record overwrite the previous one
| > (they are loaded in chronological order) and in that way
| > I will end up with the most up-to-date info about every
| > employee.
| >
| > TIA,
| >
| > -Ramon
|
| Blow it all into a single table with no constraints using a direct
| path load and then run a stored procedure to move it to its final
| destination using the MERGE statement.
|
| --
| Daniel Morgan
| http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
| http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
| damorgan_at_x.washington.edu
| (replace 'x' with a 'u' to reply)
|
how about accessing it as an external table, and use the 'PK' + a date or sequence column to just insert the 0.76% of the records that you really want, instead of performing 14,885,000 extra updates?
;-{ mcs Received on Wed Mar 10 2004 - 09:32:14 CST