@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
NULLinto target columnITEM.ITEM = @COLSTAT (NULL)
- Example 2
-
The following
@IFcalculation uses@COLSTATto returnNULLto the target column ifPRICEandQUANTITYare less than zero.ORDER_TOTAL = PRICE * QUANTITY, @IF (PRICE < 0 AND QUANTITY < 0, @COLSTAT(NULL))
- Example 3
-
In the following example
@IFcalculation uses@COLSTATto storeInfinityin the target column if the denominator is zero, otherwise, return the result of numerator/denominator.table example colmap(quotient = @if(@coltest(denominator, 0), @colstat(INFINITY), (numerator/denominator))