Actually, I do want it in the result set because the SSN is for the employEE
and the FedIDNo is for the EmployER. I need to count the Employer of a set of
Employees only once, no matter how many employees they have. If I have it in
the result set then the last record will have the count of unique FedIDNo.
Thanks.
--
David
"Eric Isaacs" wrote:
> Assuming you don't want it as part of your result set (which wouldn't
> make sense because you have the SSN in there) you just need to use
> COUNT(DISTINCT fieldname)...
>
> SELECT COUNT(DISTINCT dbo.ClientInfo.FedIDNo)
> FROM dbo.Timesheets INNER JOIN
> dbo.ClientInfo ON dbo.Timesheets.ClientLinkID =
> dbo.ClientInfo.PeopleLinkID INNER JOIN
> dbo.People INNER JOIN
> dbo.PeopleLink ON dbo.People.PersonID =
> dbo.PeopleLink.PersonID ON dbo.Timesheets.WorkerLinkID =
> dbo.PeopleLink.PeopleLinkID
>
>
> -Eric Isaacs
> .
> >> Stay informed about: Count over group