IBM PureData System for Analytics, Version 7.1

NVL2 example

In this example, the first argument is not null, so it returns the second argument.
SELECT nvl2(1,2,3);
NVL2(1,2,3)
-----------
         2

The nvl2 function is equivalent to a case expression. The result of the expression is type compatible with the second and third arguments, as it is in the corresponding case function.



Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28