PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Implementation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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. You can:
  • 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 highest 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: display the popup menu of the query (right mouse click) and select "Query description".
  2. Click the "The first n..." button.
  3. In the window that is displayed, specify the number of records to select.
    Selection
  4. Validate.
To limit the number of records found in the result of a query:
  1. Display the description window of a Select query: display the popup menu of the query (right mouse click) and select "Query description".
  2. Click the "The first n..." button.
  3. In the window that is displayed:
    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 "In percentage" is checked, the value must correspond to a percentage of all the records.
        New in version 20
        If "In percentage" is checked, the value must correspond to a percentage of all the records.
        If "In percentage" is checked, the value must correspond to a percentage of all the records.
      • Versions 20 and later
        a parameter. The parameter will have to be specified when running the query. See Two methods for passing parameters to a query for more details.
        New in version 20
        a parameter. The parameter will have to be specified when running the query. See Two methods for passing parameters to a query for more details.
        a parameter. The parameter will have to be specified when running the query. See Two methods for passing parameters to a query for more details.
  4. Validate.
Note: When selecting a range of records, specify:
  • the subscript of the first record to select.
  • the number of records to select.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment