I need to have a query that counts the records grouped by Emp ID, like
12345 1
12345 2
12345 3
12346 1
12346 2
I have tried a number of queries to do this, but all I get is an aggregated
count or errors.
I don't want to code this one, I just need to use a straight query(s)

Signature
Thank you in advance for your assistance. It is greatly appreciated.
KARL DEWEY - 30 Apr 2007 17:58 GMT
Just use a totals query like this --
SELECT YourTableName.[Emp ID], Count(YourTableName.[Emp ID]) AS CountOfEmp
FROM YourTableName
GROUP BY YourTableName.[Emp I;

Signature
KARL DEWEY
Build a little - Test a little
> I need to have a query that counts the records grouped by Emp ID, like
> 12345 1
[quoted text clipped - 6 lines]
> count or errors.
> I don't want to code this one, I just need to use a straight query(s)
John W. Vinson - 30 Apr 2007 18:59 GMT
>I need to have a query that counts the records grouped by Emp ID, like
>12345 1
[quoted text clipped - 6 lines]
>count or errors.
>I don't want to code this one, I just need to use a straight query(s)
Do you want a *count* - or a running incrementing number? Are you displaying
other fields? Do you have some other field in the table (maybe a primary key)
that you can count on being strictly ascending?
John W. Vinson [MVP]