When rows from one table are combined with rows from another table based on an equal comparison of the participating rows' values, the join bypasses rows in all searched tables which have no matching value. The rows not retrieved are not included in the active found set when the RELATED BY clause is used.
When the RELATED BY clause is specified in the query, CA Dataquery performs an inner equijoin, producing output rows by joining rows. To specify that you want the output rows to include rows not retrieved, use an outer join clause in place of the RELATED BY clause.
Syntax Diagram
Following is the syntax diagram for the outer join clause that replaces the RELATED BY clause when rows not joined are wanted in the output.
►►─ FIND ALL TABLE1 ─┬───────────┬─ outer-join-clause ─ 'key1' ─ VIA ─ key2 ──► └─ RECORDS ─┘ ►─ TO TABLE2 ────────────────────────────────────────────────────────────────►◄
See FIND Statement.
(Optional) Use ALL or a number. Defaults to ALL.
Represents the first table to be searched to retrieve data.
Optional.
A clause specifying what kinds of unmatched rows are wanted in the output. See Relationship Clauses.
Represents the name of a key in the first table that is also found in the second table.
Optional.
Represents the name of a key in the second table that is also found in the first table.
Name of the second table listed in the query.
Tables can be related by comparing a specified value in any column of table1 with values in a specified key or column in another table.
|
Copyright © 2014 CA.
All rights reserved.
|
|