Umbraco Content Search and Replace in Table cmsContentXml - MSSQL2005+

Have you ever needed to do a large scale search and replace for Umbraco content?  Yeah, me either - until today.  Typically with SQL I'd use a Replace() statement to update the content.  However, Replace() won't work with the NTEXT data type - which just happens to be the data type of the xml column where Umbraco content is stored.  I created the below script to accomplish the search and replace and ran it against content for http://www.planetmold.com and voila!

Grab the SQL script here:

As always, no warranties are implied - you're on your own.  Please let me know if you have improvements.

-Paul

0 comment(s) for “Umbraco Content Search and Replace in Table cmsContentXml - MSSQL2005+”