Posted By

klovera on 03/31/12


Tagged

replace text


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

johnw


Replace a text in SQL Server Table Column


 / Published in: MySQL
 

URL: http://amrsaafan.blogspot.com/2008/08/how-to-replace-text-in-sql-server-table.html

If you have a Table which has a Column of type char or varchar or even text, and you want to change a portion of text in it for example a path. In this case you need to change the same text with new one in every records.

  1. UPDATE [TableName]
  2. SET [ColumnName] = REPLACE([ColumnName],'OldText','NewText')

Report this snippet  

You need to login to post a comment.