Solved Does Access Support ANY Keyword in its Queries?

If it doesn't exist in Access, why did my query work?
 
I suspect ANY actually DOES exist in Access but I still think that the context is "muddled" because of there being a function in the way. ANY would be a "quantifier" operator from what I've read, but (I'm sort of guessing here) there are functions that are written for use in SQL, but they have to switch from SQL to VBA context to be evaluated. It is practically transparent to us on the outside, but it depends on whether SQL recognizes IIF as one of its own or as something that a VBA environment needs to handle. This tired old brain is not 100% sure about that, but it isn't ANY that as the problem. It is whether IIF stays in control when processing the query in SQL context. From what I've read, the SWITCH operator (which DOES work in SQL) is recommended in place of the IIF function, so let's say I've got my doubts here about context.
 
ANY is a predicate and works perfectly well. The reason you don't see it often is that it works practically the same as the IN predicate. The latter gained prominence because a number of early implementations of SQL (pre-SQL standards) did not include ANY.
 

Users who are viewing this thread

Back
Top Bottom