Re: Deleting duplicate rows

From: Miles Thomas <thomasm_at_logica.com>
Date: 1995/11/29
Message-ID: <thomasm.2.009372C6_at_logica.com>#1/1


In article <48pvri$21cr_at_thor.cmp.ilstu.edu> smblair@ edu writes:
>From: smblair_at_ edu
>Subject: Deleting duplicate rows
>Date: 20 Nov 1995 13:29:22 GMT
 

>I know this has been discussed before, but I didn't save the responses the
>first time. Anyway, due to a faulty load program, we have some duplicate
>rows. Can someone offer some suggestions as to how to get rid of the
>duplicates?
 

>TIA,
 
>Steve Blair
>Illinois State University

In Oracle7, you could alter the table to add a unique index constraint, and catch all the rows which fail the constraint into a seperate table, and then use that to delete the duplicate rows, perhaps by deleting all and then re-inserting one (using a bit of PL*SQL).

The SQL Language reference manual has the details.

This may not be any better than the other solutions, just different, especially in identifying the dud rows.

.sig: This is a personal opinion, and not the opinion of my employer. Received on Wed Nov 29 1995 - 00:00:00 CET

Original text of this message