Cleaning up duplicate records

Results 1 to 2 of 2

Thread: Cleaning up duplicate records

  1. #1
    Join Date
    Dec 1969

    Default Cleaning up duplicate records

    Hi everyone,<BR><BR>I have an access database which I have also imported to SQL server.<BR><BR>It contains 37,000 town names, each linked to one of the 50 US states. My table looks like this:<BR><BR>State_ID Town_Name<BR>1 ABCTown<BR>2 ABCTown<BR>2 ABCTown<BR><BR>I don&#039;t have a problem with there being a town of the same name where it is in a different State - i.e. the State_ID is different. But I have many duplicates where the Town_Name and State_ID are the same i.e. the same town in the same State.<BR><BR>How can I clean up the data so any duplicates are removed? Obviously whatever I do will have to take into account if the State_ID is the same as well as the town name.<BR><BR>I don&#039;t mind if I do it in Access or SQL Server or if I have to export the data etc to mess with it but I was hoping there might be a nifty SQL statement that would swiftly do it in one go?<BR><BR>I did try selecting all towns ordered by town name and looking through manually but with 37k records and many duplicates it would be impossible.<BR><BR>Many thanks in advance to anyone who can help!<BR><BR>Justyn.

  2. #2
    Join Date
    Dec 1969

    Default Answered in ASPFAQs

    I forget which category. Probably Databases, General.<BR><BR>Link to ASPFAQs is center above.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts