Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

CEIL

CEIL

Returns the smallest integer greater than or equal to the numeric value passed to this function. For example, if you pass 3.14 to CEIL, the function returns 4. If you pass 3.98 to CEIL, the function returns 4. Likewise, if you pass -3.17 to CEIL, the function returns -3.

Syntax

CEIL(
numeric_value
)
The following table describes the argument for this command:
Argument
Required/
Optional
Description
numeric_value
Required
Numeric data type. You can enter any valid transformation expression.

Return Value

Numeric value.
Double value if you pass a numeric value with declared precision greater than 38.
NULL if a value passed to the function is NULL.

Example

The following expression returns the price rounded to the next integer:
CEIL( PRICE )
PRICE
RETURN VALUE
39.79
40
125.12
126
74.24
75
NULL
NULL
-100.99
-100
You can perform arithmetic on the values passed to CEIL before CEIL returns the next integer value. For example, if you want to multiply a numeric value by 10 before you calculated the smallest integer greater than the modified value, you might write the function as follows:
CEIL( PRICE * 10 )

0 COMMENTS

We’d like to hear from you!