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 |
|
pelegk2
Aged Yak Warrior
723 Posts |
Posted - 2006-02-14 : 07:31:10
|
| how cn i count how many time a word appears in nvarchar(4000) field?thnaks in advancepelegIsrael -the best place to live in aftr heaven 9but no one wan't to go there so fast -:) |
|
|
jimmy_a
Starting Member
38 Posts |
Posted - 2006-02-14 : 07:45:57
|
| u can use split funtion to count the words"A smile is an inexpensive way to improve your looks" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-14 : 07:49:14
|
Not sure if this is feasibleDeclare @col nvarchar(4000)Declare @word varchar(100)set @col='This is to test the test that test tested'set @word='test'select (len(@col)-len(replace(@col,@word,'')))/len(@word) as No_of_test Alternatively, you can use your Front End application to split data and compare it with wordMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|