PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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.
  • Versions 20 and later
    in percentage.
    New in version 20
    in percentage.
    in percentage.
  • Versions 20 and later
    by a parameter.
    New in version 20
    by a parameter.
    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.
        Versions 20 and later
        If "By percentage" is checked, the value must be a percentage of all records.
        New in version 20
        If "By percentage" is checked, the value must be a percentage of all records.
        If "By percentage" is checked, the value must be a percentage of all records.
      • Versions 20 and later
        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.
        New in version 20
        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.
        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