I want to be able to retrieve the number of distinct rows in a table using multiple fields as the criteria for the Distinct keyword.
SELECT DISTINCT field1, field2, field3 FROM Table1
...gives a row listing of each distinct combination of
field1, field2, and field3.
But what I want is just the number of distinct combinations....
SELECT COUNT(DISTINCT field1, field2, field3) FROM Table1
...does not work.
Any ideas?
The solution is probably easy, but I'm drawing a blank....
SELECT DISTINCT field1, field2, field3 FROM Table1
...gives a row listing of each distinct combination of
field1, field2, and field3.
But what I want is just the number of distinct combinations....
SELECT COUNT(DISTINCT field1, field2, field3) FROM Table1
...does not work.
Any ideas?
The solution is probably easy, but I'm drawing a blank....