I have this table:
+--------+------------+---------------------+------+
| id | product_id | pa_value_name | oesd |
+--------+------------+---------------------+------+
| 1 | 120972 | | 0 |
| 9 | 84147 | 1-2 business days | 0 |
| 3255 | 12 | 1-3 business days | 0 |
| 260220 | 124881 | 10-12 business days | 0 |
| 641906 | 147053 | 11-13 business days | 0 |
| 650680 | 139790 | 12-14 business days | 0 |
| 702408 | 112249 | 13-15 business days | 0 |
| 705013 | 223960 | 14-16 business days | 0 |
| 736335 | 124882 | 15-17 business days | 0 |
| 765595 | 106570 | 16-18 business days | 0 |
+--------+------------+---------------------+------+
and I want to update oesd field by getting the ‘to‘ date in *pa_value_name* field.
For example:
+--------+------------+---------------------+------+
| id | product_id | pa_value_name | oesd |
+--------+------------+---------------------+------+
| 9 | 84147 | 1-2 business days | 2 |
+--------+------------+---------------------+------+
In row 2 (id=9): oesd must be 2 as it should get ‘2’ from “1-2 business days” value of *pa_value_name*.
Thanks!
This will update
oesdand convert the value to a number