ASSIGN basetable, attachtable

The syntax above links one table to another.

  • basetablename: The name of the table with full path to link to.
  • attachtable: The name of the table with full path to link.

Practical example

Command:

ASSIGN table01.table10, table02.table20

Output:

ASSIGNTABLE :: base => TABLE01.TABLE10, attached => TABLE02.TABLE20

In this case table20 is the child table of table02 and table01 as well.


ASSIGN basetable[attachtable]

The syntax above links one table to another. This expression is used when the base table's name or the attach table's name contains commas.

  • basetablename: The name of the table with full path to link to.
  • attachtable: The name of the table with full path to link.

Practical example

Command:

ASSIGN table01[table10, 1]

Output:

ASSIGNTABLE :: base => TABLE01, attached => TABLE10, 1

If you have multiple tables with the same name and you want to assign them under one table then the assign expression will aggregate the contents of these tables under one view.

Practical example

Let's say whe have three tables:

  1. table01.table20
  2. table02.table20
  3. table03

And we want to aggregate tables called table20 under table03 in one view, then the following will be excecuted:

Command:

ASSIGN table03[table01.table20]
ASSIGN table03[table02.table20]

Output:

ASSIGNTABLE :: base => TABLE03, attached => TABLE01.TABLE20
ASSIGNTABLE :: base => TABLE03, attached => TABLE02.TABLE20

At the end of this example the result will be a view under table03.table20 with the content of two tables: table01.table20 and table02.table20. In this case you cannot modify the data inside table03.table20. You are only able to delete and rename the newly assigned table. For modifications use the original table sources.
Renaming original tables will not affect the view, so the data remains consistent.