Re: sql question
From: <david.ashby_at_workcover.nsw.gov.au>
Date: 1997/12/07
Message-ID: <66fria$alb_at_cssun.mathcs.emory.edu>#1/1
Author: ministry of education <moe003_at_netvision.net.il> at WCA-INET Date: 07/12/97 6:10 PM
Date: 1997/12/07
Message-ID: <66fria$alb_at_cssun.mathcs.emory.edu>#1/1
Try this:Subject: sql question
- select distinct col1, col2 .... , count(*)
from table group by col1, col2 .... having count(*) > 1 into temp temp_dulicates;
- delete from table
where col1||col2 .... in (select col1||col2 .... from temp_duplicates);
- insert into table
select col1, col2 .... from temp_duplicates; Warning TEST this before running! Regards David Ashby ______________________________ Reply Separator _________________________________
Author: ministry of education <moe003_at_netvision.net.il> at WCA-INET Date: 07/12/97 6:10 PM
I have a table with multiple exact duplicate rows.No indexes. How do I
delete all duplicate rows to get a single occurrence for each row?Thanx. Received on Sun Dec 07 1997 - 00:00:00 CET