Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Needed When Fields are Equal 2

Status
Not open for further replies.
Jun 2, 2004
66
US
I have two fields in my Master Table...

User ID
Completed By

Both of these fields are formatted as Memo and contain names.
I am trying to structure a query that will give me a count where the User ID field and the Completed By field contain the same name. (User Id = Completed By)

Any help would be appreciated.
 
Does this work

Select [User ID], [Completed By], Count(*) AS totalCompleted from yourtable Group By [User ID],[Completed By]

-VJ
 
Something like this?
SELECT [User ID], Count(*)
FROM theTable
WHERE [User ID]=[Completed By]
GROUP BY [User ID]
;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top