I am also having a similar problem in my query. I want to exclude an
Organization in my report.
I've tried:
NOT LIKE "W.EP.03"
NOT LIKE "*EP*"
NOT LIKE "W.EP???"
NOT LIKE "%EP%"
I finally went to the Organizations Table, added the OrgAbb Field to my
query (instead of using the Cust_Org Field in the Custodians Table), and
typed Not Like "W.EP.03" which gave me the results I needed.
I noticed I got a message once concerning the dot. What should I be aware
of in using my Organizations Abbreviations in filters and/or queries?
Thank you for your response.
Kathe
Just to clarify:
The function - the *ONLY* function - of the LIKE operator is to allow
wildcards (* meaning match any string of characters, ? match any single
character, # match any digit, etc.) If your criterion does not use any
wildcards, then you don't need to use the LIKE operator - it will simply be
treated the same as the = operator, but will probably have poorer performance
since the query engine must check for wildcards.
If you want to exclude Organization W.EP.03 then simply use the not-equals
operator as a criterion:
<> "W.EP.03"
If you want to exclude a list of organizations, then you can use the NOT IN()
clause:
NOT IN("W.EP.03", "K.XY.56")
If you want to exclude all of the W.EP organizations, whatever the last two
digits might be, *then* you need LIKE:
NOT LIKE "W.EP.*"
will exclude all organizations for which the first five characters are W.EP.