Return to Snippet

Revision: 26258
at April 21, 2010 20:30 by Meander365


Initial Code
UPDATE TABLENAME SET FIELDNAME = cast(replace(cast(FIELDNAME as nvarchar(max)),'find-this','replace-this') as ntext)
WHERE Content like '%find-this%'

Initial URL
http://www.sidesofmarch.com/index.php/archive/2008/02/27/how-to-use-replace-within-ntext-columns-in-sql-server/

Initial Description

                                

Initial Title
Search and Replace String in an SQL Server nText Field

Initial Tags
sql, search, replace

Initial Language
SQL