开发者

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:

  1. Create a table without duplicates
  2. 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜