xjoinx()

Read(300) Label: multiple, cursor, cross join,

Description:

Perform cross join over single cursors or table sequences.

Syntax:

xjoinx(csi:Fi,xi,..;…)

Note:

Perform cross join on cursors/table sequences csi unconditionally to generate a new cursor composed of Fi,… fields. Each Fi references a member of the corresponding original cursor csi. The operation will filter members of csi according to the filtering criterion xi if it is supplied. Parameter csi is retraversable single cursors or table sequences.

ptions:

@1

Perform left join (Note: here is the number 1). Use null to participate in the cross join if there is no matching members in cursors csi

Parameters:

Fi

Names of fields of the result table sequence

csi

Single cursors or table sequences to be joined

xj

Filtering expression

Return value:

A cursor

Example:

 

A

 

1

=demo.cursor("select * from EMPLOYEE " )

 

2

=demo.cursor("select * from PERFORMANCE")

 

3

=xjoinx(A1:EmployeeID1;A2:EmployeeID2)

Perform cross join unconditionally

4

=A3.fetch()

5

=demo.cursor("select * from EMPLOYEE " )

 

6

=demo.cursor("select * from PERFORMANCE")

 

7

=xjoinx(A5:EmployeeID1;A6:EmployeeID2,EMPLOYEEID==EmployeeID1.EID)

Perform cross join according to the given filtering condition

 

8

=A7.fetch()

9

=demo.cursor("select * from EMPLOYEE " )

 

10

=demo.cursor("select * from PERFORMANCE")

 

11

=xjoinx@1(A9:EmployeeID1;A10:EmployeeID2,EMPLOYEEID==EmployeeID1.EID)

Left-join-type cross join

12

=A11.fetch()

Related functions:

xjoin()