Posted By

Meander365 on 04/21/10


sql search replace

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Search and Replace String in an SQL Server nText Field

 / Published in: SQL


  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  

You need to login to post a comment.