Search and Replace String in an SQL Server nText Field

/ Published in: SQL
Save to your folder(s)

Copy this code and paste it in your HTML
  1. UPDATE TABLENAME SET FIELDNAME = CAST(REPLACE(CAST(FIELDNAME AS nvarchar(MAX)),'find-this','replace-this') AS ntext)
  2. WHERE Content LIKE '%find-this%'


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.