From SSMS when I enter
DECLARE @a int = 45, @b int = 40;
SELECT IIF ( @a > @b, 'TRUE', 'FALSE' ) AS Result;
I get
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '>'.
But I copy pasted directly out of https://docs.microsoft.com/en-us/sql/t-sql/functions/logical-functions-iif-transact-sql
Why is that ?? Thanks