QUERY SELECTION

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.5 (Modified)


QUERY SELECTION ({table}{; queryArgument{; *}})

ParameterTypeDescription
tableTableTable for which to return a selection of records, or
Default table, if omitted
queryArgumentQuery argument
*Continue query flag

Description

QUERY SELECTION looks for records in table. 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 command QUERY.

Note: The command SET DATABASE PARAMETER allows you to choose whether QUERY SELECTION should use the index, depending on the number of selected records.

Example

This example illustrates the difference between QUERY and QUERY SELECTION. Here are two queries:

      ` Find ALL companies located in New York City
   QUERY ([Company]; [Company]City="New York City")
         ` Find ALL companies doing Stock Exchange business
         ` no matter where they are located
   QUERY ([Company]; [Company]Type Business="Stock Exchange") 

Note that the second QUERY simply "ignores" the result of the first one. Compare this with:

      ` Find ALL companies located in New York City
   QUERY ([Company]; [Company]City="New York City")
         ` Find companies doing Stock Exchange business 
         ` and that are located in New York City
   QUERY SELECTION ([Company]; [Company]Type Business="Stock Exchange")

QUERY SELECTION looks only among the selected records, therefore, in this example, among the companies located in New York City.


See Also

QUERY, SET DATABASE PARAMETER.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next