Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
SELECT Command (English) (m618304+select.htm)
Generates an implicit list of item-ids based on the selection criteria specified. Unless sort criteria specify otherwise, it generates the list in the order in which the items are found.
SELECT file-specifier
Refer to Sentence Structure for descriptions of these parameters.
C{n}Display running counters of the number of items selected and items processed. The counter display is refreshed after every n items processed (default 500) or after the total number of items if less than 500. For example, (C25) refreshes the display after every 25 items processed.
G{n}Completes once n items have been selected (default 500), or the end of the file is reached, whichever occurs first. Use this option to sample the contents of the file, without processing the entire file.
Note: If you specify both the C and the G option, the second value of n is ignored. For example, if you specify (C10G5, the value 10 is used.
If you need the items sorted by item-id, use SSELECT.
After you press RETURN, English displays the number of elements selected and the prompt '>'. Any of the following can then be used to act on the list:
When using SELECT with the BY-EXP or BY-EXP-DSND connective on a multivalued attribute, the list has the format:
item-id]multivalue#
where multivalue# is the position of the multivalue within the attribute specified by BY-EXP or BY-EXP-DSND. multivalue# can be used by the READNEXT statement in a DataBasic program.
In the following example, the implicit list is displayed by the subsequent use of the LIST command.
:SELECT ROOMS WITH BED-CODE "Q" 3 ITEMS SELECTED >LIST GUESTS NAME HDR-SUPP GUESTS Guest Name.......... 140 Susan P. Lynch 143 William Hennessey 144 Mr. & Mr. H. Irving
In the following example, the first 5 items in a file are returned, without scanning the complete file. These are then listed with the LIST command.
:SELECT ROOMS (G5 5 ITEMS SELECTED >LIST GUESTS NAME HDR-SUPP GUESTS Guest Name.......... 140 Susan P. Lynch 143 William Hennessey 144 Mr & Mrs H. Irving 151 Mr & Mrs P. Wright 153 Mr C. Brown