deleting records based on partial match

F

fish

I have 2 tables: Table1 contains email addresses and Table2 contains domain
names. I need help with a query that will delete records in Table1 that have
matching domains in table 2. Basically, I need to remove all email addresses
from certain domains in my database. Any help will be appreciated. Thanks!
 
D

darrep

Fish -

Try taking a look at the various string functions that are available. One
option is to use InStr to find and delete all records where the domain name
is contained in the string. You also could use other string functions to
retrieve only the portions of the string that occur after the @ symbol then
use that for comparison to delete.

HTH
 
D

darrep

Fish --

Take a look at string functions. One easy way that may work depending on
your data and business rules is using the InStr function to delete all
records where the domain name is in the email address string. If this won't
work, there are other string functions that can retrieve the portion of the
address after the @ symbol which could then be used to compare with the
domain names.

HTH
 
Top