Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Finding dup columns in 1 record
I have found that teh best way of finding and eliminating duplicates is using PL/SQL. There is a pseudocolumn rowid which uniquely identifies each row. If you have two duplicate records they will still have a different rowid, so it is easy to eliminate one of the records basing the delete on the rowid rertrieved.
FIRSTNAME LASTNAME wrote in message <3A4E2374.CA9D130C_at_merck.com>...
>I have a ( poorly designed )table that can have multiple duplicates in
>each column per record. I've tried some nested loops using PL/SQL but
>I ran into concurrency problems where it would find a duplicate pair 2
>times.
>
>Would the better solution be to fetch everything into a PL/SQL table
>then output the update SQL that way after finding the duplicates? That
>way I could write the update SQL and also update the PL/SQL table via
>array assignments so it wouldn't find the same duplicates again and
>again...
>
>TIA,
>Cliff
>
>
> The contents of this message express only the sender's opinion.
> This message does not necessarily reflect the policy or views of
> my employer, Merck & Co., Inc. All responsibility for the
statements
> made in this Usenet posting resides solely and completely with the
> sender.
Received on Thu Jan 04 2001 - 09:20:29 CST
![]() |
![]() |