Count UNIQUE results in a field from an MS Access database
Posted on 2016-10-22
I have an MS Access database. I need to get a count of the number of records which have unique results.
There are over 5000 records in the DB. The field is StandardTitle from tblContractJournals,
I need the number of unique titles.
Number of records: 7
Unique Titles: 5
My sql statement is:
sql2 = "Select COUNT(DISTINCT StandardTitle) AS DistinctCount FROM tblContractJournals "
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS2.Open sql2, objConn
SQL statement generates a PAGE cannot display.