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