Reputation: 749
I know nothing about MS Access but am trying to help a colleague. They have a database with job titles and he wants to find anyone who is a CEO but not anyone that is an "Assistant to the CEO." Some titles are "CEO", "CEO & Founder", "CEO & CTO", etc. Some of the titles he doesn't want are "Assistant to the CEO", "Administrative Assistant to the CEO", etc. I think the query
(Like "*CEO*") AND (Like "assis*")
should return titles that are not the former titles I mentioned, but Access returns nothing.
Upvotes: 1
Views: 76
Reputation: 2412
On a dataset like this:
The following query...
SELECT tblJobTitle.[JobTitle]
FROM tblJobTitle
WHERE tblJobTitle.[JobTitle] Like "*CEO*" And tblJobTitle.[JobTitle] Not Like "*to the CEO*"
..returns:
...you may want to define more strings to exclude (JobTitle Not Like
...) depending on what your data is looking like.
Upvotes: 3