I need to put a query together to delete duplicate values from a table.
If one field contains duplicate data, delete all of the other rows.
By adding just a 2nd field, I can get the distinct row to keep, like this:
SELECT MIN(T.PARTCODE) AS MP, MIN(T.SITE) AS MS
FROM (
SELECT partCode, site
FROM tblKickouts
WHERE (((partCode) In (SELECT partCode FROM tblKickouts As Tmp GROUP BY partCode
HAVING Count(*)>1 )))) T
Now how do I keep the 1 record returned, but delete all other records containing that partCode?
Thanks