ceil()

Description:

Truncate data at the specified position, and carry the remaining part if any.

Syntax:

ceil(numberExp, {nExp})

Note:

The function truncates data numberExp at the specified position nExp, and carry the remaining part (if any).

Parameters:

numberExp

Data to be truncated

nExp

An integer number specifying the truncate position; taken as 0 when it is omitted

>0: Move the decimal point to the right for nExp places,

<0: Move the decimal point to the left for nExp places,

=0: Indicate the current decimal place.

Return value:

Numeric

Example:

ceil(3450001.004,0)

3450002.0

ceil(3450001.004,-1)

3450010.0

ceil(3450001.004,-2)

3450100.0

ceil(3450001.004,1)

3450001.1

ceil(3450001.004,2)

3450001.01

Related functions:

floor()

round()

cgroups()

Here’s how to use cgroups() function.

T. cgroups(Fi,…;y:Gi,…;w)

Description:

Perform grouping and aggregation over a pre-summarized data cube.

Syntax:

T.cgroups(Fi,…;y:Gi,…;w)

Note:

For a grouping & aggregation operation over entity table T, the function automatically searches for and query an eligible cube. It will first query a cube where the grouping field is in a more front position; if there isn’t such a cube, query the whole entity table. Parameter Fi is the grouping condition, parameter Gi is the result of calculating the aggregate function y, and parameter w is the filtering condition.

Parameters:

T

Entity table

Fi

Grouping field

y

Aggregate function

Gi

Field names in result set

w

Filtering condition

Options:

@m(...;n)

Enable parallel processing; use default value when parameter n is absent (the default is the max number of parallel tasks set in Tool-Option

Return value:

A table sequence

Example:

 

A

 

1

=file("D://test/orders.ctx").create()

Open composite table file orders.ctx:

 

2

=A1.cgroups(OCount;count(OAmount):COUNT)

3

=A1.cgroups(OCount;count(OAmount):COUNT;OAmount<=3000)

Add filtering condition to A2

4

=A1.cgroups@m(OCount;count(OAmount):COUNT;OAmount<=3000;)

Parallel processing, as the number of parallel tasks is absent, use the default value

5

=A1.cgroups@m(OCount;count(OAmount):COUNT;OAmount<=3000;4)

Parallel processing with the number of parallel tasks being 4