In my Microsoft SQL Server Management if I use this query:
select * from Modules where ModuleTitle like '%MyOldString%'
I can find multiple results with different ModuleIDs like 1, 2, 5, 1257, etc. So now, I want to backup this ModuleIDs, then change all the string "MyOldString" to "MyNewString" in all that Module Titles, how should I do ? If change one of them, I can use:
update Modules set ModuleTitle = 'MyNewString' where ModuleID = 1257
But now, I only need to replace the string and all at one for all that in the search results, is it possible ? And I need to backup that ModuleIDs, in case I need to change them back.
You could update it with a replace query:
update Modules SET ModuleTitle = REPLACE(ModuleTitle,'MyOldString','MyNewString') WHERE ModuleTitle like '%MyOldString%' ;