The answer to this depends on the underlying database you're connecting to. What type of DB is it? Your syntax looks fine to me, but can you please attach a screenshot of the actual error alongside the complete SQL?
1 of 1 people found this helpful
Thanks John. In the case of Excel / Access based SQL I'd recommend you search google for JET SQL .......... , where .... is what you're looking for.
It's a different world to other SQL Engines.
I think the answer is that you need to use a SWITCH formula instead -https://www.techonthenet.com/access/functions/advanced/switch.php