PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Statistics on composite keys
  • Various
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
HStatNbRecRange (Function)
In french: HStatNbEnrIntervalle
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Returns an estimate regarding the number of entries for a given key item in a given interval of values. This estimate is deduced from the information obtained during the last statistical calculation.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// Statistical calculation on CUSTNAME key of CUSTOMER file
ResStat = HStatNbRecRange(CUSTOMER, CUSTNAME, "CLARK", "SMITH")
Syntax
<Result> = HStatNbRecRange([<File name> [, <Name of key item>, ]] <Lower bound> , <Upper bound>)
<Result>: Integer
Number of entries found for the specified item in the requested interval.
Corresponds to the hInvalidRecNum constant if:
  • the statistics have never been calculated for the specified item.
  • the statistics are not supported by the specified type of item. HFSQL allows you to perform statistical calculations on key items only.
<File name>: Optional character string (with or without quotes)
Name of data file used. If this name is not specified, HStatNbRecRange handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Name of key item>: Optional character string (with or without quotes)
Name of key item used to perform the statistical calculation. If this name is not specified, HStatNbRecRange handles the last item used by the last function for HFSQL management (starting with the letter H).
<Lower bound>: Type of key item
Lower value of interval.
<Upper bound>: Type of key item
Upper value of interval.
Remarks

Statistics on composite keys

The following syntax allows you to calculate statistics on a composite key:
HStatNbRecRange(<File name>, <Name of composite key>),
[<Lower bound of first element of composite key>,
<Lower bound of second element of composite key>],
[<Upper bound of first element of composite key>,
<Upper bound of second element of composite key>, ...])
Example:
HStatNbRecRange(CUSTOMER, LASTNAME_FIRSTNAME, ["BLACK", "Alicia"], ["MORGAN","Vince"])

Various

  • The statistics can be updated by HIndex and HStatCalculate.
  • In the HFSQL Classic data files, the statistical calculations can only be performed on key items.
Component : wd240hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment