MOD returns the remainder after division of two integers:
Integer MOD( v1 Integer, v2 Integer )
Example
The following code:
SELECT CUSTOMERS.CUSTID, CUSTOMERS.CUSTOMNAME
FROM "../Data Sources/MyDatabase/CUSTOMERS.SMA" CUSTOMERS
WHERE MOD(CUSTOMERS.CUSTID, 2) = 1
returns:
101,Signal Engineering
109,InfoEngineering
111,Advanced Design Inc.
…
For decimal data types, the result’s precision and scale for the FLOOR and CEILING functions are (p + 1, s), where (p, s) are the precision and scale of the operand.
ROUND
ROUND returns the number closest in value to the first argument, rounding away from zero. The second argument specifies the precision, with positive values indicating a position to the right of the decimal point, and negative values indicating a position to the left of the decimal point. All positions to the right of the specified position are zero in the result:
Integer ROUND( value integer, precision integer )
Decimal ROUND( value Decimal, precision integer )
Double ROUND( value Double, precision integer )
Example
The following code:
SELECT ROUND(123.4567, 2), ROUND(123.4567, -1)
returns:
123.46, 120
For decimal data types, the result’s precision and scale are (p + 1, s), where (p, s) are the precision and scale of the operand.
POWER
POWER raises the left argument (base) to the power of the right argument (exponent):
FROM "../Data Sources/MyDatabase/CUSTOMERS.SMA" CUSTOMERS
returns:
101,10201
102,10404
104,10816
…
For decimal data types, the result’s precision and scale are (P, s), where P is the maximum precision in the database or the Integration service, and s is the scale of the operand.