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:35:56
|
| sajith writes "I 've a query that should replace exact string with another string. Replace function will solve the proble partially only.select replace('the them', 'the', 'abc') will give the result as 'abc abcm'.I want the result as 'abc them' and not 'abc abcm'. It should replace only the exact word.Is there any other solution other than free text index and replace function" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-31 : 07:59:56
|
| Use an extra spaceselect replace('the them', 'the ', 'abc ') MadhivananFailing to plan is Planning to fail |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-31 : 10:44:50
|
Well. In that case split each word using split function and replace all the to abc MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|