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!

Help with Query

Status
Not open for further replies.

egobbitz

Programmer
Oct 18, 2002
47
0
0
US
Hello,
I have a table that stores some statistics information. In the table is a field called ProcessType with a possible value of 1 to 2 or 3. I want to write a query that will count the number of ProcessType = 1, count the number of processType = 2, and count the number of processType = 3.


Any help would be appreciated.

Thanks.
Nick
 
TRy something like:

SELECT [processtype] ,Count(*) AS count FROM tblWhatever GROUP BY [processtype];

hth

Ben ----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
If I was doing the query, all I would do is make a Grouping query of the the table. To do this I would create a query using the Process Type field and one other field. From the VIEW menu opition I would select the TOTALS opition. On the query grid I would leave the Process Type as GROUP BY and on the other field I choose COUNT from the Drop Down List in the Totals row.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top