SELECTINDEX |
|
|
The SELECTINDEX command constructs a select list from an alternate key index.
Format
SELECTINDEX {DICT} file.name index.name {, value ...} {TO list} {COUNT.SUP}
where
If the value element is omitted, the SELECTINDEX command constructs a select list containing all the indexed values in the specified alternate key index. It is equivalent to use of the QMBasic SELECTINDEX statement with no indexed value.
If the value element is included, the SELECTINDEX command constructs a select list containing the ids of all records in which the indexed field identified by index.name has the given value. It is equivalent to use of the QMBasic SELECTINDEX statement with an indexed value.
Both @SELECTED and @SYSTEM.RETURN.CODE will be set to the number of items selected.
Example
SELECTINDEX SALES STATUS, "P" "D"
The above statement builds the default select list as the ids of records in the SALES file for which the indexed STATUS field is either "P" or "D" |