Re: How to delete duplicated records ?

From: Juan Hernandez <haker_at_reuna.cl>
Date: 1998/11/24
Message-ID: <JUx62.15$Qx6.105_at_aconcagua.ctcreuna.cl>#1/1


I hope this help too! ;)

Table Mote (without index):

col1 col2 col3

1     aa    bb
1     aa    bb

2     cc    ddd
2     cc    ddd
2     cc    ddd
2     cc    ddd

. .. ...
. .. ...
. .. ...

Ok, now we use the magic of rowid:

delete from mote where rowid not in (

select max(rowid) from mote group by col1,col2,col3 )

Coments on this are apreciated!!

Thanks in advance

Juan A. Hernandez E.

Consultant

Coasin Chile S.A.

jhernand_at_coasin.cl

haker_at_coasin.cl

--
Received on Tue Nov 24 1998 - 00:00:00 CET

Original text of this message