Scott Palmer
asked on
Duplicate records
I have a temporary membership database that has some duplication. The problem is the on the effective and expiration dates. They don’t match exactly but they fall inside the other records effective and expiration dates. Here is an example:
Member_ID Eff_Date Exp_Date Plan Group
A1234567 1/1/2019 12/31/2019 110 AG569
A1234567 10/1/2019 10/31/2019 110 AG569
I there a way suing in sql to identify the duplicate inside the effective and expiration dates (2nd record) so that I could filter them out. I don’t want to delete them, just be able to identify them. Something like adding a field titled “Dups” that would have a “Y” in it if it is a duplicate.
The code for a simple query would be
SELECT Member_ID, Eff_Date, Exp_Date, Plan, Group
FROM Membership;
Thank,
Scott
Member_ID Eff_Date Exp_Date Plan Group
A1234567 1/1/2019 12/31/2019 110 AG569
A1234567 10/1/2019 10/31/2019 110 AG569
I there a way suing in sql to identify the duplicate inside the effective and expiration dates (2nd record) so that I could filter them out. I don’t want to delete them, just be able to identify them. Something like adding a field titled “Dups” that would have a “Y” in it if it is a duplicate.
The code for a simple query would be
SELECT Member_ID, Eff_Date, Exp_Date, Plan, Group
FROM Membership;
Thank,
Scott
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
Scott