Example: Returned Expression Errors for NULLIFZERO
The following expressions return an error if the value of x or expression is zero.
6 / x 6 / expression
On the other hand, the following expressions return null, which is not an error because there is no violation of the divide by zero rule.
6 / NULLIFZERO(x) 6 / NULLIFZERO(expression)
Example: Returned Request Errors for NULLIFZERO
The following request returns a null in the second column because the HCap field value for Newman is zero. In BTEQ (field mode), this appears as a ‘?’.
SELECT empno, NULLIFZERO(hcap) FROM employee WHERE empno = 10019 ;