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 - Series

Snowflake Vs MS-SQL - Part 79 - Adding a comment to the Column of a Table

Snowflake Vs MS-SQL - Part 75 - String Length and Trimmed Length