Snowflake Vs MS-SQL - Part 60 - Divide by Zero

      



Divide by Zero

Sometimes in calculation, if zero comes at the denominator place, it throws an error like Divide by Zero.


 
MS-SQL Server 

You can find the workaround as below:



However, in Snowflake we can use DIV0 as below.




For more details, you can refer to the following DIV0 and DIV0NULL.


  

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