Access 2003 allegedly supports SQL-92 (i’ve set it to do so), and the CASE expression is part of the SQL-92 standard (per SQL For Smarties 2nd ed., pg 127). So why then does this not work for me:
ROUND(SUM(CASE WHEN tc1.Tc_OpCode = ‘r’ THEN 1 ELSE 0), 3)
And what I really want to do is:
ROUND(SUM(CASE WHEN tc1.Tc_OpCode = ‘r’ THEN tc1.Tc_Hours ELSE 0), 3), notice that I want to return tc1.Tc_Hours rather than 0 if tc1.Tc_OpCode = ‘r’.
Thanks a lot.
-Andy