Aug 18 2021 01:36 AM
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(attached pic as ref) error makes me to believe that IIF statement is not working at all in Azure Synapse Analytics Dedicated SQL Pool.
Also this document link confirms that as well - IIF (Transact-SQL) - SQL Server | Microsoft Docs
Knew that, CASE is alternative, but want to know Is there any specific reason behind this non-working of IIF (or) not implementing in Synapse Dedicated SQL pool?
Any know-how regarding this is much appreciated!
Jul 15 2022 08:07 AM
Jul 20 2022 11:34 PM
It is documented, that IIF function is not supported by Azure Synapse Analytics - the name of this platform is not present in the "Applies to" section of the IIF documentation: IIF (Transact-SQL) - SQL Server | Microsoft Docs.
HTH,
Pawel
Dec 07 2022 10:38 AM - edited Dec 07 2022 10:38 AM
I had to convert all my IIF statements to CASE. I am just wondering if it will be supported in the future?
Thanks