op:subtract( $left as item(), $right as item() ) as map:map
This function subtracts the right numericExpression
from the left
numericExpression
and returns the value.
Parameters | |
---|---|
$left | The left numeric expression. |
$right | The right numeric expression. |
xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; let $employees := op:from-view("main", "employees") return $employees => op:select(("FirstName", "LastName", "Position", "EmployeeID", op:as("subtracted", op:subtract(op:col("EmployeeID"), 2)))) => op:result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.