QUERY SELECTION
QUERY SELECTION ( {aTable }{;}{ queryArgument {; *}} )
Parameter | Type | Description | |
---|---|---|---|
aTable | Table | → | Table for which to return a selection of records, or Default table, if omitted |
queryArgument | Expression | → | Query argument |
* | Operator | → | Continue query flag |
Description
QUERY SELECTION looks for records in aTable. The QUERY SELECTION command changes the current selection of table for the current process and makes the first record of the new selection the current record.
QUERY SELECTION works and performs the same actions as QUERY. The difference between the two commands is the scope of the query:
- QUERY looks for records among all the records in the table.
- QUERY SELECTION looks for records among the records currently selected in the table.
For more information, see the description of the QUERY command.
The QUERY SELECTION command is useful when a query cannot be defined using a sequence of QUERY calls joined with the * parameter. Typically, it is the case when you want to query a current selection that does not result from a previous query, but from a command such as USE SET.
Example
You want to query the records that have been previously highlighted by the user in a list form. You can write:
USE SET("UserSet") //replace the current selection with the highlighted records
QUERY SELECTION([Company];[Company]City="New York City";*)
QUERY SELECTION([Company]Type Business="Stock Exchange")
You will find all companies located in New York City, with a Stock Exchange activity, among the initial user selection.
See also
Properties
Command number | 341 |
Thread safe | ✓ |
Modifies variables | OK |
Changes current record | |
Changes current selection |