@COLSTAT
Use the @COLSTAT
function to return an indicator to Extract or Replicat that a column is missing, null, or invalid. The indicator can be used as part of a larger manipulation formula that uses additional conversion functions.
Syntax
@COLSTAT ({MISSING | NULL | INVALID})
Examples
- Example 1
-
The following example returns a
NULL
into target columnITEM
.ITEM = @COLSTAT (NULL)
- Example 2
-
The following
@IF
calculation uses@COLSTAT
to returnNULL
to the target column ifPRICE
andQUANTITY
are less than zero.ORDER_TOTAL = PRICE * QUANTITY, @IF (PRICE < 0 AND QUANTITY < 0, @COLSTAT(NULL))