SET SKIP Command

Example   See Also

Creates a one-to-many relationship among tables.

Syntax

SET SKIP TO [TableAlias1 [, TableAlias2] ...]

Arguments

TO TableAlias1 [, TableAlias2] ...

Specifies the aliases of multiple child tables. These are used to create a one-to-many relationship with a parent table. Use commas to separate the aliases. In commands that support a scope (DISPLAY, LIST, and so on), records in the parent table are repeated for each corresponding record in the child table.

Use SET SKIP TO without additional arguments to remove the one-to-many relationship from the parent table open in the currently selected work area. Any one-to-one relationships remain in effect. One-to-one relationships can be removed with SET RELATION TO.

Remarks

Using SET RELATION, you can establish relations between tables open in different work areas. When the record pointer is moved in the parent table, the record pointer in the child table moves to the first corresponding record. The relational expression in SET RELATION determines where the record pointer moves in the child table. A one-to-one relation is created — for each record in the parent table, the record pointer moves to the first matching record in the child table. If a matching record can't be found in the child table, the record pointer in the child table moves to the end of the table.

Frequently, a child table contains multiple records that correspond to one record in the parent table. SET SKIP lets you establish a one-to-many relationship between one record in the parent table and multiple records in the child table. When you skip through the parent table, the record pointer remains on the same parent record until the record pointer moves through all related records in the child table.

To establish a one-to-many relationship, first create the relationship between the parent and child table with SET RELATION. Then, issue SET SKIP to create a one-to-many relationship.