Starting from MS-SQL 2005 there is a new SQL function called "REPLACE" and you can use it to replace values in text fields (varchar/nvarchar/nchar...).
just put the right table names and the right column names in the following code:
update TableTable
set ArticleContent = (
SELECT REPLACE(TargetColumn, 'old value', 'new value')
FROM TargetTable Table_In
where Table_Outside.ArticleId = Table_In.ArticleId
)
from TargetTable Table_Outside
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment