Enform Plus Reference Manual
Links and the LINK OPTIONAL Statement Rules
Enform Plus Reference Manual—422684-001
C-4
Links Initiated by a WHERE Clause
The WHERE clause in the following query does not establish a link:
OPEN apple, banana;
LIST ...
WHERE apple.color = "RED"
AND banana.color = "YELLOW";
The converted form of this WHERE clause contains two terms:
apple.color = “RED” first term
AND banana.color = “YELLOW” second term
Because neither term references two record descriptions, the WHERE clause does not
establish a link.
Comparison of the WHERE Clause and the LINK Statement
A WHERE clause differs from a LINK statement as follows:
•
A WHERE clause can link more than two record descriptions. A single LINK
statement can link only two record descriptions.
•
A WHERE clause can indicate that the record descriptions are to be linked where the
values of linking fields are not equal. A LINK statement indicates that the values of
the linking fields must be equal.
•
You cannot specify OPTIONAL in a WHERE clause.
Consider the WHERE clause in the following query:
OPEN apple, orange, banana;
LIST ...
WHERE apple.seeds = orange.seeds
OR orange.skin <> banana.skin;
The converted WHERE clause contains one term:
apple.seeds = orange.seeds OR orange.skin <> banana.skin
Because this term references three record descriptions (apple, orange, and
banana), the preceding WHERE clause establishes three two-directional links between
apple, orange, and banana.
Like a LINK statement, a WHERE clause establishes a multiple dependency condition
between the linked record descriptions. A two-directional link established by a WHERE
clause can be sketched as:
record-description-1 record-description-2
where the arrowheads point at the dependent record descriptions.