| select | Index Level | sellist |
| Syntax | |
| Category | Access |
| Type | Definition |
| Description |
determines which items are to be processed by Access and is designated by the "with" or "if" modifiers.
Without any "selection clauses" in an Access sentence, every item in the file is eligible for processing. Compound selection clauses are formed with the "and" or "or" 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, in the sentence: list entity with city = "irv" city Only those items which contain "irv" in the "city" attribute are eligible for processing. String searching: Access permits the use of "string searching" (sometimes called "wild cards") which allow introducing variables into the selection criteria. For example, in the sentence: list entity with city = "irv]" city The "]" character specifies that any character(s) may follow the literal string, "irv". This means that both "irvine" and "irving" are selected. In the sentence: list entity with name "[inc." Any item whose "name" attribute ended with "inc." is eligible for processing. The "bracket" ("string searching") characters may also state an "including" or "containing" condition, as in the form: list entity with name = "[pick]" Which includes in the report any item whose "name" attribute contains the string "pick". This includes "Pick Systems", "Movenpick Restauraunts" and "The First Pick". |
| Options | |
| See Also | selection processor wildcards with sortc without sreformat t-dump s-dump sort sselect t-load sort-label stat sum select nselect Access ld list-label count list-item list Access verbs collation order itemlist |
| Example |
list entity with name "ar]" name
In this selection criteria, only those items whose "name" field begins with "ar" are selected. list entity with name "mi]" and with phone "804]" This example shows two selection clauses connected with an "and", which means that both conditions must be evaluated as true in order for the items to be selected for processing. list entity with name "re]" or with city "irv]" name city This example shows a mutually exclusive set of selection crtieria connected with an "or". Either condition evaluating to true will accept the item for processing. That is, if the "name" attribute begins with "ar", or the "city" attribute begins with "irv", the item will be selected for output. list entity with name "ar]" and with city "irv]" or with city "san]" and with contact "[joe]" There is virtually no limit to compound selection criteria in an Access sentence, with the exception of the fact that Access limits a sentence to a maximum of 9 "and" clauses. |
| Warnings | The functionality for mask and date conversions is a bit obscure. If a mask or date conversion exist in the output-conversion, that conversion is applied to the selection criteria in the Access statement. For instance, in the sentence "select filename with attr "90]", where the data contains such values as 9000, 9010, 9020, etc., the "90]" gets converted by the MR2 to "9000]". The logic is to convert the selection criteria once, rather than to convert each value that is processed by the SELECT. Moving the MR2 to the correlative attribute bypasses the conversion to the selection criteria. |
| Compatibility | D3 7.0 AP R83 |
| select | Index Level | sellist |