Re: Need to delete duplicate rows

From: Thomas Muller <ttm_at_nextra.com>
Date: 2000/04/18
Message-ID: <d2UK4.5240$By1.105697_at_news1.online.no>#1/1


Karl Hewlett <fake_address_at_auckland.ac.nz> wrote in message news:8dgiks$jk2$1_at_scream.auckland.ac.nz...
> Someone suggested select distinct into a temp table which will work,
 another
> solution would be:
>
> (Its been a while since I have had to do this so you may have to play with
> the syntax)
>
> delete from sales a
> where rowid = (select max(b.rowid)
> where a.item_code = b.item_code
> and <snip>
> );
>
> Naturally run the equivilent select count(*) first to check how many you
> will delete. :)
>

Very nice and clever!

--

Thomas
Received on Tue Apr 18 2000 - 00:00:00 CEST

Original text of this message