I think if used properly a switch function will work well in place of a lengthy IIF function. I have also used choose as well but generally I find I have to use these in places where a database is not well designed. A join on a properly indexed table is faster then having to evaluate each possible expression.
Switch evaluates all of the expressions, even though it returns only one of them. For this reason, you should watch for undesirable side effects.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.