delete duplicates

  • Thread starter Thread starter Jennifer Sanders
  • Start date Start date
J

Jennifer Sanders

I want to run a query before our weekly mailing each week
that will delete duplicate email addresses. I want to
leave the rest of the record. If there are multiples, I
want to leave one and delete the rest in the email column
only.

Can anyone provide sample query code for this?
 
Why does your db accept duplicates if you're just going to delete them?

You would be better off setting the indexed property of the field to "Yes
(No Duplicates)" in table design view.

If you don't want to do that, why not use a select query such as:

SELECT DISTINCT [EmailAddress]
FROM MyTable

which you can base your mailing on.

P
 
What will happen if I set the index property of the field
to 'yes' and a duplicate value is entered from the
website? For example if we already have a user and a user
tries to sign up...We also have an ecards application
where a user submits their email address when they send
the ecard to someone else. I wouldn't want them to get an
error message from the DB if there email address is
already there...
-----Original Message-----
Why does your db accept duplicates if you're just going to delete them?

You would be better off setting the indexed property of the field to "Yes
(No Duplicates)" in table design view.

If you don't want to do that, why not use a select query such as:

SELECT DISTINCT [EmailAddress]
FROM MyTable

which you can base your mailing on.

P


I want to run a query before our weekly mailing each week
that will delete duplicate email addresses. I want to
leave the rest of the record. If there are multiples, I
want to leave one and delete the rest in the email column
only.

Can anyone provide sample query code for this?


.
 
Back
Top