Reputation: 3041
I have a requirement where, I am trying to write a query that looks into my column Values and if a particular value is found then it changes them.
For Example if ABC or DEF is found then it is replaced by " "
DatabaseName: TestDB
TableName: Table1
Actual Data in the Table1
ColA
Test
Test1 ABC
Test2 DEF
This needs to be changed to something like,
ColA
Test
Test1
Test2
Upvotes: 0
Views: 431
Reputation: 48177
update Table1
set ColA = replace(replace(ColA, 'ABC', ''), 'DEF', '')
Upvotes: 2