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

Duplicate records

P: n/a
I have scanned through previous posts and can't find the answer I am
looking for.

I have a query that finds the duplicates of a table. The problem is
these aren't "true" duplicates where every field is the same. I would
like to compare two fields to determine if the record should be
deleted or not.

Table fields, ID, score1, score2, source, date

In my query, ID, score1 and score2 are the "duplicates". The source
can be one of 4 values (D, G, S, O)...I always want to keep the O
record, however, if there is no O record, I want to keep the D or G
over the S

Second, the date...I would like to compare the dates...If they are 30
days from each other, delete the duplicate...If they are more than 30
days, keep both records.

Can anyone assist me with the proper query?

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.