By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,469 Members | 2,402 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,469 IT Pros & Developers. It's quick & easy.

Duplicate Entry removal

P: n/a
I have a database that someone altered a query and for the last severalmonths it has duplicated entries each time the update process was run. I
need to delete the duplicates but in the last month update added an addition3 million lines of data and really don't want to manually have to gothrough
this manually. Can someone suggest a way to create a delete query that willonly keep the single entry for each acct.

Brian





Oct 9 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 8 Oct 2007 21:05:12 -0400, Brian <no*****@bellsouth.net>
wrote:

I would realize this can only have happened if there was a bad
database design. If you had a unique index over the columns you now
object are duplicated, this could not have happened.
So I would create the correct table, with the correct indexes, and
then run an append query to add all records. If you are lucky, the
good ones will be added and the bad ones won't be added because that
would violate the index.
Then rename the old table, break all relationships, rename the new one
to the name of the old one, and reestablish the relationships.

-Tom.

I have a database that someone altered a query and for the last several months it has duplicated entries each time the update process was run. I
need to delete the duplicates but in the last month update added an addition 3 million lines of data and really don't want to manually have to go through
this manually. Can someone suggest a way to create a delete query that will only keep the single entry for each acct.

Brian





Oct 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.