Getting rid of duplicate records

  • Hello

    I'm rather new to SQL, finally converting from FoxPro databases (awesome I know). While importing some tables, I inadvertently loaded up one twice. Now, I could just delete it and re-import, but I want to rid myself of the dupes. I've tried to a number of things (SELECT DISTINCT wont work because there are a couple of calculated fields that were calculated after the load up).

    Now because of the calculated fields, the records are no longer 'distinct', but the ID in the table does repeat... so... any idea how to get rid of the dupes?

    Thanks!

  • Hi,

    Many methods are there to identify / delete the duplicate data from the table, Refer these articles

    http://support.microsoft.com/kb/139444

    http://www.sqlteam.com/article/deleting-duplicate-records

  • If you have any unique fields in the table, take out the count having >1

    into an temporary table. Delete the original table matching with the temporary table unique values and port data from temporary into original table

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply