|
|
|
|
|
Select query: Displaying the first/last n records
The editor of select queries is used to limit the number of records that will be displayed in the result of the query. It allows you to: - select the first n records found in the query result.
- select the last n records found in the query result.
- select the n records from a given record found in the query result.
The number of records to select can be defined: - by value.
- in percentage.
- by a parameter.
For example, you want to find out: - the ten best customers: the customers with the greatest turnover.
- the 15 worst selling products.
- the 20 products found after the record XXX.
- ...
To limit the number of records found in the result of a query: - Display the description window of a Select query: right-click to open the context menu of the query and select "Query description".
- Click the "The first n..." button.
- In the window that appears:
- Specify the range of records to select: the first ones, the last ones or a group of records.
- Specify the number of records that will be taken into account. This number can correspond to:
- a value.
If "By percentage" is checked, the value must be a percentage of all records. - a parameter. The parameter will have to be specified when running the query. For more details, see Two methods for passing parameters to a query.
- Validate.
Remark: When selecting a range of records, specify: - the index of the first record to be selected.
- the number of records to select.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|