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 |
|
djokerss
Starting Member
28 Posts |
Posted - 2004-08-23 : 05:21:59
|
| i have a field with data like this :A;AB;ABC;ABCDEi want to counting return the number of time (';' oranother char in that field.with this sample it return 3 when i ask ';'anyone can help me the syntact for than ? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-08-23 : 05:25:00
|
| select len(@str) - len(replace(@str,';','')==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-23 : 05:37:37
|
| nigel: i must say this is a great idea. this would never occur to me.... ok maybe in moment of enlightement :))Go with the flow & have fun! Else fight the flow :) |
 |
|
|
djokerss
Starting Member
28 Posts |
Posted - 2004-08-23 : 21:39:45
|
| thanks nr for your repply...it help me so much.. |
 |
|
|
|
|
|