Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Duplicates based on criterium
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