mcs.mergex()

Description:

Merge multicursors or composite table multicursors into an ordinary cursor.

Syntax:

mcs.mergex(xi,…)

Note:

The function merges multicursors by field expression xi. Parameter mcs is a multicursor ordered by field expressions [xi,…], in which each member is synchronously segmented and has the same number of segments. When mcs is a composite table multicursor, perform the merge automatically by dimension(s) and field before it (them).

Parameters:

mcs

A multicursor or a composite table multicursor

xi

A field expression; use the comma to separate multiple expressions if it is a merge by multiple fields, like x1,x2...

Return value:

An ordinary cursor

Example:

 

A

 

1

=demo.query("select EID,NAME,GENDER,SALARY from EMPLOYEE where EID<6")

Data is ordered by EID

2

=demo.query("select EID,NAME,GENDER,SALARY from EMPLOYEE where EID<10 and EID>5")

Data is ordered by EID

3

=[A1.cursor(),A2.cursor()].mcursor()

Generate a multicursor from a sequecne of cursors

4

=A3.mergex(EID)

Merge parts of a multicursor to convert it into an ordinary cursor

5

=A4.fetch()

Fetch data from A4’s cursor