T.attach( T’,C… )

Read(603) Label: composite table, attached table,

Description:

Add an attached table to the base table of a composite table.

Synatx:

T.attach(T’,C…)

Note:

The function adds attached table T’ to a composite table’s base table T. A composite table can have one or multiple attached tables. The attached table’s dimensions include the dimensions of its base table; its column names should be different from the base table’s column names.

Parameters:

T

A base table

T’

An attached table

C

Attached table column, can be omitted; return an attached table named T’ if it is absent; a C preceded by # is a dimension

Return value:

An attached table

Example:

 

A

 

1

=file("D:/ctb.ctx")

 

2

=A1.create(#k1,v1)

Create the composite table’s base table where k1 is the dimension and v1 is the column

3

=A2.attach(table2,#k2,v2)

Add attached table table2 to A2’s base table; k1 and k2 are the attached table’s dimensions and v1 and v2 are its columns

4

=A2.attach(table3,v3)

Add attached table table3 to A2’s base table; k1 is the attached table’s dimension and v1 and v3 are its columns