MS Access has this function:
IIF(expr1,expr2,expr3)
If expr1 evaluates to true, the function returns expr1, otherwise it returns expr2
So IIF(1=2,"yes","no") would return "no".
How can I do something similar in SQL Server without using transact SQL? I am just writing a normal SQL statement, not a stored procedure.
IIF(expr1,expr2,expr3)
If expr1 evaluates to true, the function returns expr1, otherwise it returns expr2
So IIF(1=2,"yes","no") would return "no".
How can I do something similar in SQL Server without using transact SQL? I am just writing a normal SQL statement, not a stored procedure.