What is the proper syntax for replacing characters?
My replace statement:
Select replace(note,’old’,’new’) from history
So I am trying to update instances of 'old' to 'new' in the note column of the history table.
The result: The updated text is displayed as I would it expect but the change is not committed so the actual update doesn't happen.
This topic has been locked.
1 reply Latest Post - 2012-03-07T12:25:20Z by SystemAdmin
Pinned topic 'Replace' syntax
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-07T12:25:20Z at 2012-03-07T12:25:20Z by SystemAdmin
SystemAdmin 110000D4XK1143 PostsACCEPTED ANSWER
Re: 'Replace' syntax2012-03-07T12:25:20Z in response to LKMAIf you want to update column, you should use UPDATE statement IMHO.
UPDATE history SET note=replace(note,’old’,’new’)
-- WHERE ....if you do not want to update all fields put restriction here