Transformation Language Reference > Functions > FLOOR
  

FLOOR

Returns the largest integer less than or equal to the numeric value you pass to this function. For example, if you pass 3.14 to FLOOR, the function returns 3. If you pass 3.98 to FLOOR, the function returns 3. Likewise, if you pass -3.17 to FLOOR, the function returns -4.

Syntax

FLOOR( numeric_value )
The following table describes the argument for this command:
Argument
Required/
Optional
Description
numeric_value
Required
Numeric datatype. You can enter any valid transformation expression as long as it evaluates to numeric data.

Return Value

Integer if you pass a numeric value with declared precision between 0 and 28.
Double if you pass a numeric value with declared precision greater than 28.
NULL if a value passed to the function is NULL.

Example

The following expression returns the largest integer less than or equal to the values in the PRICE port:
FLOOR( PRICE )
PRICE
RETURN VALUE
39.79
39
125.12
125
74.24
74
NULL
NULL
-100.99
-101
FLOOR( UNIT_PRICE * 10 )