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: "Seek and destroy" duplicate entries

Re: "Seek and destroy" duplicate entries

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Mon, 16 Oct 2006 16:40:19 +0200
Message-ID: <4phjujFipgm5U2@individual.net>


On 16.10.2006 14:48, Alex wrote:

> Robert Klemme schrieb:

>> 1. You can use the min(rowid) for every unique combination to delete all
>> superfluous records.
>>
>> However, I find these approaches more attractive:
>>
>> 2. Use a staging table and move the data from there to the target table
>> that has proper constraints with a SELECT DISTINCT or GROUP BY. (Or is
>> your import table the staging table already?)
>>
>> 3. Filter during import to avoid duplicates during insertion (for
>> example by having SQL*Loader reject records that violate constraints).
> @2: The table I'm talking of ist already a staging table.
> @3: For various reasons there are no constraints on the staging tables
> defined at all.

Constraints on the /target/ tables!!

> So I stick to the rowid-method.

Well, if you copy anyway then distinct or group by seem to be the easiest and most portable solutions.

        robert Received on Mon Oct 16 2006 - 09:40:19 CDT

Original text of this message

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