The SUBTRACT function subtracts one number from another and returns the difference of the subtraction operation.
Category
Mathematical
Syntax
SUBTRACT(numeric_value, subtraction_value)
or
numeric_value - subtraction_value
Parameters and Descriptions
Parameter | Description |
---|---|
numeric value | A numeric value from a source datastore field/column, user specified numeric value or the numeric result of another Function. |
subtraction value | This parameter specifies the number that will be subtracted from numeric_value. This number can be from a source datastore field/column, user specified numeric value or the numeric result of another Function. |
Example 1
Subtract the source field MIN_AGE from source field EMP_AGE and map the result to AGE_DIFF. Assume that MIN_AGE is 18 and EMP_AGE is 35.
AGE_DIFF = EMP_AGE - MIN_AGE
Returns the value of 17 and maps it to the target field.
Example 2
Subtract the number 50 from the number 75 and map the result to target field TGT_FLD1.
TGT_FLD1 = SUBTRACT (75, 50)
Returns the value of 25 and maps it to the target field.