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 -> Duplicates based on criterium

Duplicates based on criterium

From: <pmenich_at_gmail.com>
Date: 19 May 2006 08:24:21 -0700
Message-ID: <1148052261.584622.293140@j55g2000cwa.googlegroups.com>


Hello,

to begin with sorry for my english.
I,m using Oracle 10g. I have problem with selecting duplicates entries from databases.
I must select all duplicates fulfil following criterium:

duplicates are entries that have at least three (also four five) from five column filled with the same data (not case sensative).

For example:

I have table that has following columns: id, lastname, firstname, postbox, email, city, street
and i must retrive those entries that have the same data in at least three of following five columns: lastname, firstname, email, postbox, city

id | lastname | firstname | postbox | email | city | street 1 | Paul | Smith | 50670 | psmith_at_something.com | Muenchen | Rosenheimerstr
2 | Paul | Smith | 51000 | any_at_something.com | Dortmund | Franziskanerstr
3 | Paul | Smith | 51678 | no_at_something.com | Muenchen | Ludwigstr

entries with id: 1 and 3 are duplicates because has the same three of five columns

I need efficient solution, beacuse I'm must retrive duplicates from big database.

Best regards, Pawel Received on Fri May 19 2006 - 10:24:21 CDT

Original text of this message

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