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.

Versions 18 and later

This function is now available in Windows Store apps mode.

New in version 18

This function is now available in Windows Store apps mode.

This function is now available in Windows Store apps mode.

Remark: From version 19, HFSQL is the new name of HyperFileSQL.

Versions 21 and later

This function is now available in Universal Windows 10 App mode.

New in version 21

This function is now available in Universal Windows 10 App mode.

This function is now available in Universal Windows 10 App mode.

Versions 22 and later

This function is now available for iPhone/iPad applications.

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for Java applications.

New in version 22

This function is now available for iPhone/iPad applications.

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for Java applications.

This function is now available for iPhone/iPad applications.

This function is now available in Android Widget mode.

This function is now available for Android applications.

This function is now available for Java applications.

Example

// Calculate the statistics on the CustName key found in Customer data file ResStat = Customer.StatNbRecRange(CustName, "Clark", "Smith")

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 data file used.

<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, <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>, ...])