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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum up user occurences in a query

Status
Not open for further replies.

jacko999

Technical User
Apr 30, 2007
32
0
0
GB
in my database i have ten fields each containing user initials as a textfield. we need for each user we need to know how many times each user appears in each field and displayed in a number.

Chris :D

Chris :D
 




hi,

horrific table!!!
Code:
Select F1, Count(f1) From [TheTable] Group by F1
Union
Select F2, Count(f2) From [TheTable] Group by F2
Union
...
Select F10, Count(f10) From [TheTable] Group by F10


Skip,
[sub]
[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue][/sub]
 
In case you are wondering about Skip's "horrific table!!!" comment, you might want to find some good resources on normalization and table structures.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top