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 |
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-05-29 : 17:13:00
|
| Hello guys, I would like to execute a t-sql query and replace a string by another in all records. I did this : UPDATE myTableSET myColumn = replace(myColumn,'old string','new string')The error I get is : Argument data type ntext is invalid for argument 1 of replace function. Thank you very much for any help!Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
|
|
nr
SQLTeam MVY
12543 Posts |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-05-30 : 06:17:04
|
| Hello nr, thank you for your help!I couldn't manage to get it works, so I gave up and did it with a little .NET application :-)Thanks anyway!Regards,FabianPS it's a petty that sql-server 2005 did not introduce this functinalitymy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-05-30 : 06:39:33
|
quote: Originally posted by fabianus76 Hello nr, thank you for your help!I couldn't manage to get it works, so I gave up and did it with a little .NET application :-)Thanks anyway!Regards,FabianPS it's a petty that sql-server 2005 did not introduce this functinalitymy favorit hoster is ASPnix : www.aspnix.com !
In 2005 you could use NVARCHAR(MAX) and not have this problem.CODO ERGO SUM |
 |
|
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2006-05-30 : 07:46:09
|
| Hello Michael, you mean that the data type nvarchar makes it possible to use the replace() function?Thank you for the info!Regards,Fabianmy favorit hoster is ASPnix : www.aspnix.com ! |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2006-05-30 : 08:00:04
|
quote: Originally posted by fabianus76 Hello Michael, you mean that the data type nvarchar makes it possible to use the replace() function?
Yes.-------Moo. :) |
 |
|
|
|
|
|
|
|