I have table with a column "code" that has a value that looks like this for example
3_22_00418
I need to update this value to
3_01_00418
And I need to do this for all rows in my table
what I tried is the following:
UPDATE table SET
code = CASE
WHEN id='1' THEN '3_01_00418'
WHEN id='2' THEN '3_01_00519'
WHEN id='3' THEN '3_01_00647'
...
But this requires me to basically right all rows and I have hundreds of rows this will take a while.
How can I do it smarter?
_22_to_01_