NULLIFZERO_UDF

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Definition

Converts data from zero to null to avoid problems with division by zero.

PUBLIC.NULLIFZERO_UDF(NUMBER_TO_VALIDATE NUMBER)

Parameters

NUMBER_TO_VALIDATE NUMBER

The input number to validate.

Returns

Null if the number is zero, otherwise the number.

Usage example

Input:

SELECT NULLIFZERO_UDF(0);

Output:

NULL

Last updated