06 Oct 18 ·  nVector in bigquery ·        Bookmark ·  Report ·  More actions.. Lock comments ·  Pin thread

BigQuery - Handling Division by Zero Error

Consider you have to do x/y returning null, if y=0, however, In BigQuery it will throw the error:

Error: division by zero


In standard SQL you can use,

It is equivalent to the division operator (/). Returns NULL if an error occurs, such as division by zero


posted on 06 Oct 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds