LINK Statement
Statements
058057 Tandem Computers Incorporated
4–29
Any record description that is linked to a “non-contributing” record description is also
“non-contributing.” For example, consider the following query specifications:
OPEN employee, region, order;
LINK order.salesman TO OPTIONAL employee.empnum;
LIST ordernum, empname, regname
WHERE employee.regnum = region.regnum;
If the employee record description is “non-contributing” for a given logical record, the
region record description is also “non-contributing” for that logical record.
ENFORM handles “non-contributing” records as follows:
1.
If your query specifications contain a WHERE clause, ENFORM evaluates each
logical record to determine whether it satisfies the terms of the WHERE clause.
For a given logical record, ENFORM ignores any term in a WHERE clause that references
a “non-contributing” record description. If several record descriptions are “non-
contributing” for a given logical record, ENFORM ignores all terms in the WHERE
clause that reference the “non-contributing” record descriptions. If all of the record
descriptions referenced in the WHERE clause contribute to the logical record,
ENFORM uses all the terms in the WHERE clause.
2.
For a given logical record, ENFORM supplies null values for any fields that
correspond to a “non-contributing” record description. If your query
specifications include expressions or aggregates that reference these null field
values, ENFORM computes the expression or aggregate value by using blank
values. In some cases, this use of blanks might cause undesirable results. For
example:
If you specify that the aggregates COUNT, MAX, or MIN (or a similar user
aggregate) are to be performed for a field containing null values, ENFORM
will count or compare the null values just like any other value.
If you specify that the aggregates SUM or AVG (or a similar user aggregate)
are to be performed for a binary numeric field containing null values,
ENFORM will include the null values as ASCII blanks in the resulting
computations.
If you include the UNIQUE specification with an aggregate, the null value will
be considered a UNIQUE value. (This will occur if null values are not stored in
the field for which the aggregate is being computed.)
If a binary numeric field that contains null values is included in an arithmetic
expression, ENFORM will include the null values as ASCII blanks in the
specified computations. Because null values correspond to a very large binary
number, this could result in a very large, and probably, meaningless, result.
Summary of Contents for ENFORM 058057
Page 6: ...New and Changed Information 058057 Tandem Computers Incorporated v...
Page 18: ...Preface xvi 058057 Tandem Computers Incorporated This page left intentionally blank...
Page 19: ...Preface 058057 Tandem Computers Incorporated xvii...
Page 269: ...Glossary Glossary 4 058057 Tandem Computers Incorporated This page left intentionally blank...