ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Query editor / Operations on queries
  • Overview
  • Implementation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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.
  • ...
Implementation
To limit the number of records found in the result of a query:
  1. Display the description window of a Select query: right-click to open the context menu of the query and select "Query description".
  2. Click the "The first n..." button.
  3. In the window that appears:
    Selection
    • 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.
  4. Validate.
Remark: When selecting a range of records, specify:
  • the index of the first record to be selected.
  • the number of records to select.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/31/2024

Send a report | Local help