Reputation: 579
Please educate me. What is the difference between using NOT rather than (<>)
(NOT ([tblTitles].[locTitle])="xxx Avenue")
versus
([tblTitles].[locTitle])<>"xxx Avenue")
Both examples seem to work fine I just don't know the "proper" thing to do or whatever is the acceptable practice.
Thank you, Fred
Upvotes: 0
Views: 569
Reputation: 1661
In your example they are both equivalent and you can use the expression you prefer without any effects on the result.
But keep in mind that the NOT-operator is much more powerful as you can invert any expression with it. E.g. expressions using LIKE or IN, which result in criteria that can usually not be expressed any other way.
... WHERE ProductCode NOT LIKE 'A*'
... WHERE ProductCode NOT IN ('A','B','C')
or you can apply it to the results of a sub-query:
... WHERE ProductCode NOT IN (SELECT code FROM otherTable)
Upvotes: 1