How can I remove duplicate records in Access only if all fields match?
I have a tabl开发者_如何学JAVAe that unfortunately has many duplicates. Here is a small example:
Name | Location
Mike | New Jersey Mike | Ohio Brian | Ohio Mike | New Jersey
How can I only remove dups on the Mike | New Jersey lines? I'm having trouble making sure all fields match and not just Name. So my end result would be:
Name | Location
Mike | New Jersey Mike | Ohio Brian | Ohio
Easier to do that in two steps:
- Create a table without duplicates
- Truncate original table and load data from table you just created
To create a Query that will remove duplicates, use Group By. E.g.
SELECT Name,Location
FROM TABLE_NAME
GROUP BY Name,Location
精彩评论