Reputation: 7377
I have this column
column
London/paris
toronto/paris
Tokyo/paris
I want to update only the word 'paris'
My desirable result:
column
London/turkey
toronto/turkey
Tokyo/turkey
Can I have a condition like if next to paris is toronto I update it to berlin?
EDIT.
I want to know the queries in oracle or sybase. (I am not sure if I can ask this question separated in ora and syb, I hope a moderator give me an advice about that)
Upvotes: 0
Views: 115
Reputation: 4753
you can use the replace function for TSQL to do this
UPDATE myTable
SET MyColumn = REPLACE(MyColumn, 'paris', 'turkey')
WHERE MyColumn LIKE '%paris%'
Upvotes: 2