count DISTINCT [field1] where [field2]=True

CoffeeGuru

Registered User.
Local time
Today, 01:29
Joined
Jun 20, 2013
Messages
121
I am trying to get a distinct count of [FAMILY] where [ACTIVE] = True

I am using SQL server back end with pass through query to create my report. This is I guess important as DISTINCT becomes a valid operator...I think.
 
Why not GROUP BY?
Code:
SELECT Count([FAMILY]) As CountOfFamilies
FROM yourTableName
GROUP BY [FAMILY]
WHERE [ACTIVE] = -1;
 
Sorry my bad

This is in a report footer
 
Huh??!!?? Could the Report not have a recordsource? Which could be this Query?
 

Users who are viewing this thread

Back
Top Bottom