NULLIFZERO_UDF

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