Eliminating Dups???

N

Nyrubi

Hi I need help please with the following:
I am working with mailing list. I need to identify duplicates only. Once I
identify duplicates, I need to only keep one instance of this same address
but it needs to be the address with the individuals age greater than the
other instances of the dup address. If same age than I need to just pick the
first instance or pick by gender.

What I did is ran a dup query from my original table. Which gives me the
table I need to work with. I tried running a group(total) query with age
being last or max but the other fields do not match to the corresponding
individual. When I have two instances of the same age I want my query to
pick the first.

Can someone please help me refine this process so that I eventually only
have once instance of dup address? Thank you any help will be greatly
appreciated.
 
D

Dale Fye

Nyrubi,

You might try something like:

1. Make a backup of your table just in case this does not do what you want
2. Create a query that looks something like the following:

DELETE A.*
FROM tbl_Addresses as A
WHERE A.Age <> DMAX("Age", "tbl_Addresses", "Address = '" & A.Address & "'")

BTW, Age is not a good field to include in your table. It is generally
preferred to store the date of birth, which will allow you to compute the age
on any given date.

If your Address field is actually multiple fields, you will have to modify
the criteria portion of the DMAX domain function to include references to all
of the critical address fields (street, city, state).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top