Query and Order, Introduction

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


When managing data, you can select a group of records with which you want to work. To do so, you can either select all the records in the table or perform a query that selects specific records.

There is always one selection of records per table per process. The current selection is the set of records most recently selected. To save the current selection, you can use named selections as discussed in the Named Selections section.

You can perform single and multiple queries. Single queries contain one search criterion while multiple queries contain two or more query criteria.

Multiple Queries

Querying on two or more fields is called a compound or multiple query. When you perform a compound query, you combine separate query conditions using a logical operator. The logical operator tells 4th Dimension how to combine the results of the individual queries.

The logical operators let you create compound queries conditions such as "Find the employees located in New York or in California." The query conditions for this search would be as follows: When this query is executed, 4D Server finds all the employees located in either New York or California.

When querying a table, you can query the entire table or only the current selection. You can also choose between a simple query that uses a single query criterion or a more complex query that uses multiple query criteria.

The Query and Order routines are:

OP Single query - performs a simple query on the entire file.

OP Single query selection - performs a simple query on the current selection.

 OP Single order by - orders the records in the selection on one field.

OP Multi query - performs a more complex query on the entire file.

OP Multi query selection - performs a more complex query on the current selection.

 OP Multi order by - orders the records in the selection on more than one field.

See Also

No reference.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next