• esProc
Tutorial
Function Reference
Code Reference
User Reference
External Library Guide
Data File Tool Manual
DQL Tutorial
Cluster Server Manager Manual
SPL WIN Manual
• YModel
User Reference
JSON-style Parameter Guide
• ReportLite
User Reference
• Official Website

# mergex()

Here is how to use the mergex() function.

## CS.mergex()

Description:

Merge members of a sequence of composite table (multi)cursors.

Syntax:

CS.mergex()

Note:

CS is a sequence of composite table cursors. The function merges members of CS automatically via the dimension field (and the field before it).

Members of CS should be of same structure. The function supports multicursors; if members are multicursors, they should have the same number of subcursors and are segmented synchronously.

Parameter:

 CS A sequence of composite table cursors

Return value:

Cursor

Example:

Perform merge on a sequence of composite table cursors:

 A 1 =file("emp_f.ctx").open().cursor() Below is content of composite table emp_f.ctx: 2 =file("emp_m.ctx").open().cursor() Below is content of composite table emp_m.ctx: 3 =[A1,A2].mergex() Merge composite tables in A1 and A2 via their dimension fields and return result as a cursor. 4 =A3.fetch() Fetch data from A3’s cursor:

Perform merge on a sequence of composite table multicursors:

 A 1 =file("emp_f.ctx").open().cursor@m(;;3) Generate a multicursor having 3 subcursors based on composite table emp_f.ctx, whose content is as follows: 2 =file("emp_m.ctx").open().cursor(;;A1) Synchronously divide entity table emp_m.ctx according to A1’s multicursor; below is result content of the entity table: 3 =[A1,A2].mergex() Merge composite table multicursors in A1 and A2 via their dimension fields and return result as a cursor. 4 =A3.fetch() Fetch data from A3’s cursor:

Related function: