Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ricopauw
Starting Member
1 Post |
Posted - 2002-12-03 : 06:38:28
|
Hi,In the table there is a somefield which can be 1 of 5 values, indicating a type. I want to count how many times each type occurs in the data. I'm using MS Acces 97 ( :( )In pseudocode I want to do:for each unique somefield do select Count FieldID print resultNextI tried:select count (FieldID) as field1from table1where (some conditions AND somefield = thefieldunionselect distinct somefield AS thefieldfrom table1 'yes, it's all in one table even the somefield & thefield are the same physical columnwhere someconditionRegards,rico |
|
mr_mist
Grunnio
1870 Posts |
Posted - 2002-12-03 : 06:42:38
|
Select count(field), typegroup by type-------Moo. |
 |
|
|
|
|