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 |
|
gavakie
Posting Yak Master
221 Posts |
Posted - 2010-09-24 : 09:24:42
|
| I need to count everytime there is a one in a column like this000011111111 -- 9000000000000 -- 0000000000000 --0011010110101 -- 7Can this be done? |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2010-09-24 : 16:51:52
|
| And if it is not just ones and zeros:SELECT LEN(@COL)-LEN(REPLACE(@COL,'1',''))________________________________________________If it is not practically useful, then it is practically useless.________________________________________________ |
 |
|
|
|
|
|