I cant find any solution to do this in mySQL. Is there any funciton for this?
I tried to do this with SUBSTRING_INDEX, but I cant solve with it.
My table looks like this:
+----+-------+--------------+
| id | group | work_place |
+----+-------+--------------+
| 1 | TTL | ERG PT TT RK |
+----+----------------------+
| 2 | PFF | ER PT TL KK |
+----+-------+--------------+
And I need this:
+-------+------------+------+
| group | work_place | No. |
+-------+------------+------+
| TTL | ERP | 1 |
+-------+------------+------+
| TTL | PT | 2 |
+-------+------------+------+
| TTL | TT | 3 |
+-------+------------+------+
| TTL | RK | 4 |
+-------+------------+------+
| PFF | ER | 1 |
+-------+------------+------+
| PFF | PT | 2 |
+-------+------------+------+
| PFF | TL | 3 |
+-------+------------+------+
| PFF | KK | 4 |
+-------+------------+------+