Writing SQL code to delete duplicate records

Joined
Nov 30, 2012
Messages
3
Reaction score
0
I am hoping someone might be able to help. I have a database that I am trying to delete the duplicate records (there is no way to stop these as its from an excel spread sheet that has over 70,000 records)
I have created a couple of queries using SQL to get the total number to around 1400 records, however there are still duplicates where a customer has entered the postcode for instance with and then again without a space inbetween.
What I was hoping for, is to do a SQL query to delete all duplicate records searching on the First Name, Surname and postcode, however I need it to show the results with all columns (Title, First Name, Surname, Address, Address2, Town/City, County, Postcode)
I have that this makes sense to someone as I have been searching everywhere for an answer, but nothing really makes sense (as this is the first time I have started using SQL coding so I am a complete novice when it comes to this.
I am currently using Microsoft Access 2010
Thank you in advance!!
 
to tell the truth i tried it so many times but eventually added it to my VB.net Project as i was programming project, at first i wanted to remove dublicates from my table using query , but it didn't work, so i added it to the project as sql statements and VB.net functions ,, only to remove duplicates
 
You need to use a GROUP BY statement, followed by a condition using HAVING COUNT > 1 to match duplicate rows.
 
Back
Top