hi, i am having a table with 854977 records in it, each time an append query puts in data into the table, i must run a delete duplicate query against it, so duplicate records are removed, i build a query which deletes duplicate records, and it works for a table that has 30,000 records like a charm, but when i run it against my table which has 854,977 records its freezing and hangs down, ahat can i do for that?
here is how my table looks like, it has 4 columns
ID Image ITEM FilePath
now a duplicate record is considered ONLY if all 3 fields are the same, ID will not be the same its autonumber column
here is my query that i use
then i tried another one, and it also hangs here it isDELETE Orders.*FROM Orders
WHERE ((((SELECT COUNT (*) FROM Orders AS L
WHERE (L.Image & L.ITEM & L.FilePath
= Orders.Image & Orders.ITEM & Orders.FilePath)
AND (L.ID <= Orders.ID)))>1));
DELETE *FROM Orders
WHERE Orders.ID NOT IN
(Select MAX(ID)
FROM Orders
GROUP BY Orders.Image, Orders.ITEM, Orders.FilePath
);