Home | Sign in | English EN
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Returns the number of duplicates for a given key item. This number of duplicates was calculated during the last calculation of statistics.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
Java This function is now available for Java applications.
New in version 22
Java This function is now available for Java applications.
Java This function is now available for Java applications.
// Calculate statistics about duplicates on the CustName key of the Customer data file
ResStat = Customer.StatNbDuplicates(CustName)
<Result> = <Source>.StatNbDuplicates([<Key item>])
<Result>: Integer
Number of duplicates found. 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>.StatNbDuplicates will use the last item used by the last HFSQL management function (function starting with "H").
  • The statistics can also be updated by <Source>.Index. <Source>.Index and <Source>.StatCalculate are the only two functions that update the statistics of the data file.
  • In the HFSQL Classic data files, the statistical calculations can only be performed on key items.
  • The number of duplicates corresponds to the total numer of entries less the number of distinct values. For example, if the entries are the numbers: 1, 3, 3, 5, 5, 5, 6, 7, 7, 7, 8, 9, then the number of duplicates is 12-7 = 5.
Component: wd260hf.dll
Minimum version required
  • Version 25
This page is also available for…
Click [Add] to post a comment