Trying to use IIF() in SELECT statement and getting the error "Incorrect syntax near '>'." in Azure Synapse Analytics-Dedicated SQL pool
Tried like below:
SELECT IIF(1>2, 'YES', 'NO');
This error makes me to believe that IIF statement is not working at all in Azure Synapse Analytics Dedicated SQL Pool.
Knew that, CASE is alternative but want to know Is there any specific reason behind this non-working of IIF in Synapse Dedicated SQL pool?
Any know-how or knowledge share would be much appreciated regarding this!


CASEis standard SQL.IIF()is bespoke SQL. I would suggest that you use the method that is standard SQL.