I'm using Sql Server 2005 and ASP.NET 1.1. Within the table is a ntext field containing varying HTML markup. What we want to do is search all records within the table for the following colors:
#cdf1e0|#f0f7f5|#008000|#189b79|#Ddfaec
which could be written as a css style (ie. color:#cdf1e0, rgb(205,241,224)) or within a font tag (ie. <font color="#cdf1e0">). Then switch all these colors to #Ededdc.
Is this possible with a Sql Server 2005 sql query or must i break it up in chunks using C# code as the go between? I've already tried updating the records via C# (i used String to store the ntext sql result) but the final output was horrible; jumble of text
and missing tags.
Thanks
-
-
You shoudl be able to cast nText as NVARCHAR(MAX) and then use normal SQL syntax to search and replace for the string values you want using the SQL REPLACE function ... I think ...
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.