Error using iif in ms access query
- by naveen
I am trying to fire this query in MS Access
SELECT file_number,
IIF(invoice_type='Spent on Coding',SUM(CINT(invoice_amount)), 0) as CodingExpense
FROM invoice
GROUP BY file_number
I am getting this error
Error in list of function arguments: '=' not recognized. Unable to
parse query text.
I tried replacing IIF with SWITCH to no avail.
What's wrong with my query and how to correct this?