ceil(X)
Returns the smallest integer greater than or equal to the given value. The result is a decimal data type.
Syntax
ceil(X)
Input
| Argument | Type | Description |
|---|---|---|
X |
any numeric type | A numeric value |
Return Value
Returns a decimal value corresponding to the smallest integer greater than or equal to
X.
If X is N/A, the result is N/A.
Sample Usage
<table cols="int_value,dec_value" types="i,f"> 1,-5.25; 2,5.0; 3,13; 4,4.5; 5,5.0; </table> <willbe name="ceil_int_example" value="ceil(int_value)"/> <willbe name="ceil_dec_example" value="ceil(dec_value)"/> <colord cols="int_value,ceil_int_example,dec_value,ceil_dec_example"/>

Example
In this example, the ceil(X) function returns the smallest integer greater
than or equal to the given value of the cost column on the
pub.demo.retail.item table. The new column contains decimal data type
values.
<base table="pub.demo.retail.item"/> <colord cols="transid, account, store, date, sku, cost"/> <willbe name="ceilcost" value="ceil(cost)"/>

