Is there a way to remove duplicates when there are two duplicate value fields. We are trying to remove students from a database that have taken the same test twice. We know how to find the duplicates but we want to be able to have a query to remove the duplicates without having to do it manually.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Remove duplicate records (Access 2002)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Remove duplicate records (Access 2002)
- This topic has 5 replies, 4 voices, and was last updated 16 years, 7 months ago.
AuthorTopicWSsporledm
AskWoody LoungerMarch 26, 2008 at 8:37 pm #449743Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerMarch 26, 2008 at 11:10 pm #1103553Welcome to Woody’s Lounge!
Are the records complete duplicates, or is there a field on which you can distinguish records, an AutoNumber field for example? If the latter is true, you can create a query based on the duplicates query that selects the minimum value (for example) of the distinguishing field for each duplicate, and delete those records.
-
WSsiflaar
AskWoody LoungerJuly 16, 2008 at 7:43 pm #1117404Hello Hans,
Great solution. I understand it, but have no clue how to change the SQL so it will work.
As example here the SQL of the duplicate query:SELECT tblTekstBestand.controle, tblTekstBestand.nummer, tblTekstBestand.[Type profiel code], tblTekstBestand.[Type profiel oms], tblTekstBestand.Peildatum, tblTekstBestand.[Type relatiegroep code], tblTekstBestand.[Code relatiegroep], tblTekstBestand.[Intern specialisme code]
FROM tblTekstBestand
WHERE (((tblTekstBestand.controle) In (SELECT [controle] FROM [tblTekstBestand] As Tmp GROUP BY [controle] HAVING Count(*)>1 )))
ORDER BY tblTekstBestand.controle;the field [nummer] has the autonumber values.
Could you please explane what to change to only show the lowest numbers of the duplicates?
Thanks in advance.
Patrick Schouten
The Netherlands -
WSHansV
AskWoody LoungerJuly 16, 2008 at 8:15 pm #1117406The query
SELECT Min(nummer) FROM tblTekstBestand GROUP BY controle
will select the lowest nummer for each controle (not only the duplicates)
The following delete query will remove duplicate records, leaving the one with the lowest nummer value. Create a backup of the table and/or the database before trying it!
DELETE tblTekstBestand.nummer
FROM tblTekstBestand
WHERE tblTekstBestand.nummer Not In (SELECT Min(nummer) FROM tblTekstBestand GROUP BY controle)
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
World Passkey Day 2025
by
Alex5723
1 hour, 30 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
9 hours, 19 minutes ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
10 hours, 18 minutes ago -
Cached credentials is not a new bug
by
Susan Bradley
13 hours, 52 minutes ago -
Win11 24H4 Slow!
by
Bob Bible
14 hours, 3 minutes ago -
Microsoft hiking XBox prices starting today due to Trump’s tariffs
by
Alex5723
11 hours, 14 minutes ago -
Asus adds “movement sensor” to their Graphics cards
by
n0ads
16 hours, 13 minutes ago -
‘Minority Report’ coming to NYC
by
Alex5723
12 hours, 33 minutes ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
1 day ago -
Tracking content block list GONE in Firefox 138
by
Bob99
1 day ago -
How do I migrate Password Managers
by
Rush2112
8 hours, 9 minutes ago -
Orb : how fast is my Internet connection
by
Alex5723
9 hours, 58 minutes ago -
Solid color background slows Windows 7 login
by
Alex5723
1 day, 12 hours ago -
Windows 11, version 24H2 might not download via Windows Server Updates Services
by
Alex5723
1 day, 11 hours ago -
Security fixes for Firefox
by
Susan Bradley
11 hours, 33 minutes ago -
Notice on termination of services of LG Mobile Phone Software Updates
by
Alex5723
1 day, 23 hours ago -
Update your Apple Devices Wormable Zero-Click Remote Code Execution in AirPlay..
by
Alex5723
2 days, 8 hours ago -
Amazon denies it had plans to be clear about consumer tariff costs
by
Alex5723
1 day, 23 hours ago -
Return of the brain dead FF sidebar
by
EricB
1 day, 10 hours ago -
Windows Settings Managed by your Organization
by
WSDavidO61
13 hours, 37 minutes ago -
Securing Laptop for Trustee Administrattor
by
PeachesP
10 hours, 2 minutes ago -
The local account tax
by
Susan Bradley
1 day, 11 hours ago -
Recall is back with KB5055627(OS Build 26100.3915) Preview
by
Alex5723
2 days, 21 hours ago -
Digital TV Antenna Recommendation
by
Win7and10
2 days, 13 hours ago -
Server 2019 Domain Controllers broken by updates
by
MP Support
3 days, 9 hours ago -
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
3 days, 10 hours ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
3 days, 14 hours ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
2 days, 16 hours ago -
Steps to take before updating to 24H2
by
Susan Bradley
14 hours, 29 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
2 days, 21 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.