I'm looking for a way to replace just a portion of a string with a part of a string for same row via MySQL query.
For example, if I have records that title='blablabla - XX.YY.ZZZZ' and I want to add only the string, ZZZZ, to a field - extra_fields but with a format '[{"value":"ZZZZ"}]'
Original table:
title | extra_field
--------------------
19.02.1996 | [empty]
13.05.1815 | [empty]
22.03.2016 | [empty]
After the update I need:
title | extra_field
-------------------
19.02.1996 | Year was 1996
13.05.1815 | Year was 1815
22.03.2016 | Year was 2016