How to find & remove incorrect e-mail addresses from Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a dbase containing 8000 e-mail addresses of which a small proportion
are incorrect. Often the record stands out as being wrong as it does not
contain '@' for example. How do I search for and remove incorrect records by
e-mail address?
 
Garry,

Depends on your definition of "incorrect". By your example, what you
need is a delete query like:

DELETE MyTable.*
FROM MyTable
WHERE InStr(1,[fldEmailAddress],"@")=0

Or, to remove records where there is an "/" character, which is invalid:

DELETE MyTable.*
FROM MyTable
WHERE InStr(1,[fldEmailAddress],"/")> 0

Hope this gives you an idea.

Caution: Always backup before you try deletions!

HTH,
Nikos
 
I have a dbase containing 8000 e-mail addresses of which a small proportion
are incorrect. Often the record stands out as being wrong as it does not
contain '@' for example. How do I search for and remove incorrect records by
e-mail address?

To find them use a query with a criterion

NOT LIKE "*@*"

To delete them, first doublecheck that the records found by this query
really should be deleted, and change the query to a Delete query.


John W. Vinson[MVP]
 
Back
Top