access.selection.criteria

Definition/Access: Verbs, Releases: AP and R83

Description of Access selection criteria.

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'.

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.

See Also

Command Name Type Description
access.selection.processor Definition Gathers items for Access processes.
wildcards Definition allows Access to search for strings beginning with, ending with, or containing a given string.
access.with Modifier Defines selection criteria in Access sentence.
tcl.sortc Verb: Access Sorts item-ids in four-column format. Invokes program 'listc'.
access.without Modifier Same as with no or with not.
access.sreformat Verb: Access Reformats data in sorted order to file or tape.
access.t-dump Verb: Access Dumps items to tape.
access.s-dump Verb: Access Dumps items to tape in sorted order.
access.sort Verb: Access Sorts file.
access.sselect Verb: Access Creates sorted list of items meeting specific criteria.
access.t-load Verb: Access Loads data from t-dump format magnetic media.
access.sort-label Verb: Access Produces formatted and sorted labels.
access.stat Verb: Access Displays total and average of numeric field.
access.sum Verb: Access Displays total of numeric field.
access.select Verb: Access Creates list of items meeting specific criteria.
access.nselect Verb: Access Performs 'not' select - only items not there.
access.introduction Introductory a Pick facility to retrieve and output data.
tcl.ld Verb: Access Displays sorted file dictionary.
access.list-label Verb: Access Produces formatted labels.
access.count Verb: Access Counts items in a file.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.