Can any one write a singe query to delete all duplicate entries from a
table?
Thanks
Rob
Printable View
Can any one write a singe query to delete all duplicate entries from a
table?
Thanks
Rob
Hi Rob,
This example would delete all records where the ID > 1, be careful with this type of update, you may not be too happy if you delete the records that you really want to keep.
DELETE DISTINCTROW colume1
FROM table
WHERE (((table.colume1) In (SELECT [colume1] FROM [table] As Tmp GROUP BY [colume1] HAVING Count(*)>1 )));
Hope this helps.
Darrell
On 2/9/99 4:23:11 PM, Rob wrote:
> Can any one write a singe query to delete all duplicate entries from
> a
table?
Thanks
Rob