What I came up with so far but I have to run it several times for multiple duplicates of the same record:
DELETE *
FROM [table1]
WHERE ID IN ( SELECT Min(ID) FROM [table1] GROUP BY [col1], [col2], [col3] HAVING COUNT([col2])>1);
Hi,
I'm writing a code to DELETE all duplicate records. I can easily find all duplicates with SELECT statement. However, I'm confused how to integrate my SELECT into DELETE statement:
SELECT [col1], [col2], [col3] FROM [table1] GROUP BY [col1], [col2], [col3] HAVING (COUNT([col2])>0)
Thank you.
So I guess proper way of formatting employee numbers would be after importing to Access and using DAO.Recordset.
Forgot to mention that spreadsheet contains roughly 20,000 records.
Happy holiday everyone!
So I have employee number column formatted ##-##### using Format Cell in Excel. After transferring my sheet over to Access formatting disappears:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblTmp", strFile, True
Are there any another "easy" ways to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.