FLOOR, CEILING, MOD
FLOOR returns the largest integer not greater than the argument’s value. The result is cast to the specified type:
Decimal FLOOR( value Decimal )
Double FLOOR( value Double )
Example
The following code:
SELECT FLOOR(123.45), FLOOR(-123.45), FLOOR(0.0)
returns:
123,-124,0
CEILING returns the smallest integer not less than the argument’s value. The result is cast to the specified type:
Decimal CEILING( value Decimal )
Double CEILING( value Double )
Example
The following code:
SELECT CEILING(123.45), CEILING(-123.45), CEILING(0.0)
returns:
124,-123,0
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.

Additional Links:

Copyright Actuate Corporation 2012