Today I've found how Replace function is useful in SQL. Because I need to update all columns of every table in our database. Using Replace is very simple.

view plain print about
1UPDATE <TABLE> SET
2columnText = REPLACE (columnText, 'StringToFind', 'StringToReplace')

Above query is correct for nvarchar field but when I'm trying to replace for ntext and text field, it's getting error that "replace isn't ok for text field". That's why I'm goggling and found nice example as follow.

view plain print about
1UPDATE <Table> SET columnText =
2REPLACE(SUBSTRING(columnText, 1, DATALENGTH(columnText)), 'StringToFind','StringToReplace')