TO_NULLABLE_INT
Syntax
TO_NULLABLE_INT ( condition )
Null handling
If the input value is NULL, the output value is NULL as well.
Example
[1] Evaluate a condition and convert to int. Note the NULL output for the comparison with NULL. | ||||||||||||||||
| ||||||||||||||||
|
[2] Comparing TO_NULLABLE_INT to an equivalent CASE WHEN statement producing the same output. | ||||||||||||||||||||||
| ||||||||||||||||||||||
|
[3] An example showing the use of logical operators in the condition. The result shows how the NULL handling of the AND and the OR operators is propagated to the TO_NULLABLE_INT operator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[4] An example with a condition combining two tables connected by a 1:N relationship. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[5] An example showing the use of TO_NULLABLE_INT for counting automated activities for each case. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|