Purpose
When you want to relate tables to one another but only select certain rows, add a WITH clause to the relationship statement. The WITH clause specifies which rows should be selected to make up the active found set.
Operation
The selection criteria can consist of multiple conditions which serve to limit the number of rows to those which meet all conditions. See section WITH Clauses for more information.
You can decide not to include any selection criteria. This causes CA Dataquery to select all the rows in the specified table. However, this can cause the query selection process to run for a long period of time due to CA Dataquery selecting a potentially large amount of rows, depending on the size of the table involved.
Syntax Diagram
The following shows the syntax of RELATED BY when specifying selection criteria.
►►─ RELATED ─┬──────┬─ key-name ─┬───────┬─┬──────┬─┬─────────┬─ table-name ──► └─ BY ─┘ └─ KEY ─┘ └─ TO ─┘ └─ FIRST ─┘ ►─┬────────────┬─┬───────┬─┬────────┬─ operand1 ─ comparison-operator ───────► └─ (status) ─┘ └─ ROW ─┘ └─ WITH ─┘ ►─ operand2 ─┬───────────┬───────────────────────────────────────────────────►◄ └─┬─ AND ─┬─┘ └─ OR ──┘
Represents one or more logical expressions which specify the criteria on which CA Dataquery is to select rows from the database. A WITH clause contains the criteria which qualify the rows. Only those rows which meet the specified criteria in the WITH clause are selected.
See Simple Relationship with a Common Key for an explanation of the other keywords in the RELATED BY syntax.
|
Copyright © 2014 CA.
All rights reserved.
|
|