Get Unique Values Description:

The code below demonstrates how to find the unique values stored within a database field by using the SQL DISTINCT function.

 

Previous to version 8.1, the QueryDef object did not support SQL group functions such as DISTINCT. This function, as well as MAX, MIN and SUM, now works for QueryDef objects on non-versioned Oracle, SQL Server and Access tables. It is still the case that QueryDef does not support the ORDER BY or GROUP BY clauses or correlated subqueries. The QueryDef still does not support any group functions on versioned tables.

 

An alternative method of finding unique values is to use IDataStatistics (see the example under the IDataStatistics topic), which has the advantage of letting you sample a set of rows. It also works on versioned tables.


How to use:
  1. Paste the code into your VB or VBA Application.
  2. Call the function from within your application.

相关文章:

  • 2021-08-30
  • 2021-07-24
  • 2021-09-05
  • 2022-12-23
  • 2021-11-26
  • 2022-01-13
  • 2021-05-28
  • 2022-03-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-04-23
  • 2021-07-21
  • 2021-11-29
  • 2022-12-23
相关资源
相似解决方案