Selection criteria determines which items are to be processed by AQL and is designated by the with or if modifiers. Without any selection clauses in an AQL sentence, every item in the file is eligible for processing.
Compound selection clauses are formed with relational operators. When two clauses are connected by an and, both conditions must evaluate to true for an item to be selected for processing. When two selection clauses are connected with an or, or no relational operator is specified between selection clauses, either condition may evaluate to true for the item to be selected for processing.
The value specified in the valuestring clause must match exactly with the stored value for selection to occur. For example:
list entity with city = "irv" city
Only those items that contain irv in the city attribute are eligible for processing.
Selection criteria limits the data that must be met. Multiple criteria may be established to limit data selection to meeting a certain set of limitations. These sets are established by the logical relational connectives.
An active list can be used by another select sentence to narrow down the resulting list. A list can be passed to another list until a save-list or any other AQL, TCL, or FlashBASIC command is invoked. For example:
select entity with state = "ny" n items selected. select entity with city = "syracuse" m items selected. list entity name city state phone
The above series of sentences first selects all entity items in the state of New York (ny), then out of these selects all entity items in the city of Syracuse, and then outputs a columnar report of name city state and phone.
The AQL pre-processor is an enhancement to the Access query language used on D3. The pre-processor provides two major functions:
Adds the ability to use and define phrases that contain parts of AQL sentences.
Eliminates the requirement that explicit values be enclosed in quotation marks, except to resolve ambiguities.
The AQL pre-processor is enabled by changing the command definition in the master dictionary for any AQL commands pre-processing is desired. The pre-processor scans the input sentence, expands phrases and determines which words are values, then passes the sentence to the standard AQL compiler. In normal operation, the AQL pre-processor processes the input statement before the AQL compiler.
Access Query Language, after operator, and clause, before operator, AQL command categories, count command, ge operator, Item list, ld command, le operator, list command, list-item command (Access Query Language), list-label command, not operator, nselect command, Phrases, s-dump command, select command, Selection processor, sort command, sort-label command, sortc command, sreformat command, sselect command, istat command, check-sum command, t-dump command, t-load command, with modifier, without modifier