What is the best way to count the total number of occurences of values that reside in the same column. I want to get these counts as 1 row grouped by owner.
Final requirement - accomplish this in a stored procedure.
I could run 9 COUNTS(*)s to get the data but that seems wrong.
Table Stru
ID INT 4
INTVALUE INT 4
DATAOWNER VARCHAR(3)
Int values range of allowable values is 1,2,3,4...,11
I want to create a return rowset with the number of
1's in Col 1
2's in Col 2
3's in Col 3
etcs
Example
Number of 1's Number of 2's Number of 3's
21 42 84
Terry Rooks
Software Systems Architect
Microsoft Certified Solution Developer.Net
If at first you don't succeed, then skydiving definitely isn't for you.