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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-08-31 : 07:41:57
|
Div writes "I have 8 columns consisting of 1 letter each.I want to be able to count the number of times that the letter 'a' or 'b' until 'z' occurs in one record. For example, for record number 1, the following information is available:Column 1: aColumn 1: kColumn 1: tColumn 1: sColumn 1: aColumn 1: dColumn 1: dColumn 1: kI want to be able to see that for this record there are 2 occurences of 'a',2 occurences of 'k', 1 occurence of 't', etc.Please help!!I'm using SQL Version 8.0 and Windows XP Professional.Thank you!Divya" |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-31 : 07:53:09
|
Is this?Select column1, count(column1) from yourTable group by column1MadhivananFailing to plan is Planning to fail |
|
|
|
|
|