The IFNULL command is used for checking whether a source Datastore field is null or not and if it is, initialize its value or raise an Exception.
Category
Specialized
Syntax
IFNULL <source_field> SETSPACE | SETZERO | SETEXP
Parameters and Descriptions
Parameter | Description |
---|---|
<source_field> | Specifies the name of a source field/column. |
SETSPACE | Keyword that specifies the Null source field/column will be replaced with Spaces. |
SETZERO | Keyword that specifies the Null source field/column will be replaced with Zero. |
SETEXP | Keyword that specifies an Exception will be raised if the value of the source field/column is NULL. While this will cause the Apply Engine to terminate, it indicates that it has been previously determined that the condition cannot be resolved simply by changing the data to a predetermined the value. |
Example
If a NULL value is found in source_field1, set the value of the field to Spaces before performing any source to target mapping.
IFNULL CDCIN.DEPT_NAME SETSPACE;