Search code examples
sqlms-accesswhere-clausesql-like

How to use "like" and "not like" in SQL MSAccess for the same field?


I would like to filter all the rows that are:

field like "*AA*" and field not like "*BB*"

But this is returning everything instead of showing all the rows that contains AA and doesn't contain BB.

well now it works like expected, just restarted ms access...

Sorry for my typo... :s updated


Solution

  • Try this:

    field like "*AA*" and field not like "*BB*"