I have table having below records
Sno A
- --
1 spoo74399p
2 spoo75399p
I want to update the above records by replacing oo
(alphabet 'o') by zero
Required OUTPUT
----------------
Sno A
1 sp0074399p
2 sp0075399p
I have table having below records
Sno A
- --
1 spoo74399p
2 spoo75399p
I want to update the above records by replacing oo
(alphabet 'o') by zero
Required OUTPUT
----------------
Sno A
1 sp0074399p
2 sp0075399p
I want to update the above records by replacing oo (alphabet 'o') by zero
Is this what you are looking for?
update mytable set a = replace(a, 'oo', '00')
I might use REGEXP_REPLACE
here to be as specific as possible:
UPDATE yourTable
SET A = REGEXP_REPLACE(A, '^spoo', 'sp00');
This would only target the oo
occurring near the beginning, after sp
.