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.

FLOOR( numeric_value )

Argument | Required/ Optional | Description |
---|---|---|

numeric_value | Required | Numeric datatype. You can enter any valid expression as long as it evaluates to numeric data. |

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.

The following expression returns the largest integer less than or equal to the values in the PRICE column:

FLOOR( PRICE )

PRICE | RETURN VALUE |
---|---|

39.79 | 39 |

125.12 | 125 |

74.24 | 74 |

NULL | NULL |

-100.99 | -101 |

You can perform arithmetic on the values you pass to FLOOR. For example, to multiply a numeric value by 10 and then calculate the largest integer that is less than the product, you might write the function as follows:

FLOOR( UNIT_PRICE * 10 )

© Copyright Informatica LLC 2007, 2021