filter on multiple terms

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

Guest

I have a database of company names, and i need to filter out certain names
that are franchises etc, such as Wendy's and Kroger. I would like the filter
to be a list of names that could be 10 or 12 entries long, but I cannot use
NOT LIKE on more than one entry apparently. is there a way to do this?
 
I would create a table of key words to store values like Wendy's,... For
instance using the Customers table in Northwind:
Create a table "tblKeyWords" with a single text field "KeyWord". Add key
words of "Manager" and "Sales". Then create a query with SQL of:

SELECT Customers.*
FROM Customers
WHERE (((Customers.CustomerID) Not In (Select CustomerID FROM Customers c,
tblKeyWords k WHERE c.ContactTitle like "*" & k.KeyWord & "*")));

This will display all the customer records where Manager and Sales are not
in the ContactTitle field.
 
Back
Top