op.subtract( numericExpression as String, numericExpression as String ) as numericExpression
This function subtracts the right numericExpression
from the left
numericExpression
and returns the value.
Parameters | |
---|---|
numericExpression | The left numeric expression. |
numericExpression | The right numeric expression. |
const op = require('/MarkLogic/optic'); const employees = op.fromView('main', 'employees'); employees.select(["FirstName", "LastName", "Position", "EmployeeID", op.as("subtracted", op.subtract(op.col("EmployeeID"), 2))]) .result();