DEFINE RELATION command

Used to define a relation between two or more ACL tables.

Syntax

DEFINE RELATION key_field WITH related_table_name INDEX index_name
<AS relation_name>

Parameters

key_field

Specifies the key field of the parent table. You can select only one field for each relation.

WITH related_table_name

Specifies the child table.

INDEX index_name

Specifies the index for the key field of the child table. You must index the child table on the key field before you can relate the table.

AS relation_name

Optional. Specifies a unique name for the relation. By default, DEFINE RELATION uses the name of the child table as the relation name. If you are defining additional relations to the same child table, you must specify a unique name.

Remarks

You can use this command to process and analyze information from more than one ACL table at a time by adding columns from related tables to views associated with the parent table. The maximum number of tables that can be related is 18.

Example

Relate the open table to the Customer table by using the customer number field as the key field:

DEFINE RELATION Number WITH Customer INDEX Customer_on_number

Customer_on_number is the index of the Customer table, where the Number field is the key field.

Related reference
INDEX command


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback