ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Statistics on composite keys
  • Miscellaneous
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
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.
Example
// Calculate statistics about the CustName key from the Customer data file
ResStat = Customer.StatNbRecRange(CustName, "Clark", "Smith")
Syntax
<Result> = <Source>.StatNbRecRange([<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.
<Source>: Type corresponding to the specified source
Name of the data file used.
<Key item>: Optional character string
Name of the key item used to calculate statistics. If this name is not specified, <Source>.StatNbRecRange will use the last item used by the last HFSQL management function (function starting with "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:
<Data file>.StatNbRecRange(<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:
Customer.StatNbRecRange(LastName_FirstName, ["Black", "Alicia"], ["Morgan","Vince"])

Miscellaneous

Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help