Hello,
Do Access queries support the CASE WHEN SQL command? Whenever I try to
use them, I get a syntax error (missing operator) and the word WHEN is
highlighted.
For Example:
SELECT
COUNT(CASE WHEN MyField <20 THEN 1 ELSE NULL END)
FROM MyTable;
FYI, the WHEN and MyField can be reversed and still be correct SQL
Syntax:
SELECT
COUNT(CASE MyField WHEN <20 THEN 1 ELSE NULL END)
FROM MyTable;
Both methods work fine in SQL Query Analyzer but not in Access.
Thanks in advance for your comments.
Jeremy