cs.group()

Description:

Group a cluster cursor by comparing each record with its next neighbor.

Syntax:

cs.group(x,…)

Note:

The function groups records in ordered cluster cursor cs according to expression x by comparing the value of x only with its next neighbor, and returns the cluster cursor containing a sequence of groups. The operation is equivalent to a merge and supports multicursors.

Parameter:

cs

A cluster cursor

x

Grouping expression; use comma to separate multiple grouping fields or expressions

Return value:

The grouped cluster cursor

Example:

 

A

 

1

=file("employees.ctx","192.168.0.111:8281")

Below is employees.ctx ordered by DEPT field:

2

=A1.open()

Create a cluster composite table.

3

=A2.cursor()

Return a cluster cursor.

4

=A3.group(DEPT)

Group the cluster cursor by DEPT and return the grouped cluster cursor.

5

=A4.fetch()