I am using SQL Server 2012 Express Edition and want to make use of the new IIF-function. I am using the following code:
IIF(Rank=1,'Gold',IIF(Rank =2,'Silver', 'Bronze'))
Rank is a databasefield.
My problem is that (when working in the criteria pane of Studio) I am getting the following error:An expression of non-boolean type specified in a context where a condition is expected, near '('
It looks like IIF is not recognized??
Working in de sql pane of Studio the error is something like: Error in list of function arguments: '=' not recognized.
Unable to parse query text.
I have tried almost everything to get the problem solved, but nothing seems to work.
Can anyone get me out of this mess?