The any operator selects the first record in a related table that matches the current record being processed. Since any returns the value from just the first related record, it is typically used when you are accessing the one side of a many-to-one relationship.
any TABLENAME | RELATIONSHIP
[named "UNIQUE RELATIONSHIP NAME" ]
[with ( selection criteria) ] FIELDNAME ;|.
Returns:
The specified value from the first matching record in the related table. The type of value returned is the same as that of the specified field.
Usage:
The any operator can be used to:
Specify output items in a list records command.
Specify selection criteria.
Select related records from more than one table on each relationship level (i.e., Secondary tables, Tertiary tables, etc.). See Primary Table for details on relationship levels.
any MEMBERS LAST NAME in order ;
FIRST NAME;
DATE OF BIRTH.
This script tells DataEase: (1) Select all the FAMILY MEMBERS records, (2) for each record selected from the FAMILY MEMBERS table, list the LAST NAME from the (one) related MEMBERS record, and (3) list the first name and birthdate of each family member. The output, sorted by LAST NAME, might look as follows:
Last Name |
First Name |
Date of Birth |
Adams |
Will |
09/23/60 |
Adams |
Becca |
04/28/90 |
Adams |
Annalee |
08/12/63 |
Albert |
Roland |
12/07/48 |
Albert |
Rhonda |
12/10/78 |
Albert |
Lori |
06/27/82 |
Albert |
Kay. |
11/03/50 |
... |
... |
... |