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 |
PeteLeHoq
Starting Member
37 Posts |
Posted - 2013-12-10 : 11:00:04
|
I've got a lot of %20 characters in my tables, and need to remove them however I get the error:Argument data type ntext is invalid for argument 1 of replace function.My Code:UPDATE cmsPropertyDataSET dataNtext = REPLACE(dataNtext,'%20','')WHERE cmsPropertyData.contentNodeId = 1151 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-12-10 : 11:32:26
|
[code]UPDATE cmsPropertyDataSET dataNtext = REPLACE(convert(varchar(max), dataNtext),'%20','')WHERE cmsPropertyData.contentNodeId = 1151[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-11 : 05:31:53
|
As a sidenote ntext datatype is deprecated from sql 2005 onwards. so you should be using nvarchar(max) instead------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|