Snowflake Vs MS-SQL - Part 10 - Single level IIF

      


Single level IIF


MS-SQL Server 

If you want to return based on some condition, we go with case statement. 




In Snowflake we can achieve this by using same query as above. However there is an alternative solution as below:




You can use this in nesting format as well:



For more details, you can refer the following LINK.



Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 36 - SPLIT_TO_TABLE

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 33 - INITCAP