Question : Replace part of ntext field SQL

I used that code:

UPDATE CMRC_Products set Desc = replace(Cast(LongDesc AS NVARCHAR(Max)), '+ System.Configuration.ConfigurationManager.AppSettings["Domain"]+', '@mysite.com')

Its says row affected, but its not true... noting was changed!

So I want to change the part of the email address (@mysite.com) in the file to + System.Configuration.ConfigurationManager.AppSettings["Domain"]+'

Any help?

Answer : Replace part of ntext field SQL

your replace structure in in the reverse order

UPDATE CMRC_Products set Desc = replace(Cast(LongDesc AS NVARCHAR(Max)), '@mysite.com','+ System.Configuration.ConfigurationManager.AppSettings["Domain"]+')
Random Solutions  
 
programming4us programming4us