Hi guys
Could someone tell me what query to use to transform this
into this?
Thanks!
Could someone tell me what query to use to transform this
Code:
+----------+-----------------+----------------------------------+---------------
| table_ID | service_type_ID | service_type_name | service_order
+----------+-----------------+----------------------------------+---------------
| 1 | NULL | service 1 | 1
| 2 | NULL | service 2 | 2
| 4 | 1 | NULL | 1
| 5 | 1 | NULL | 2
| 6 | 1 | NULL | 3
| 7 | 2 | NULL | 1
| 8 | 2 | NULL | 2
+----------+-----------------+----------------------------------+---------------
into this?
Code:
+----------+-----------------+----------------------------------+---------------
| table_ID | service_type_ID | service_type_name | service_order
+----------+-----------------+----------------------------------+---------------
| 1 | NULL | service 1 | 1
| 4 | 1 | NULL | 1
| 5 | 1 | NULL | 2
| 6 | 1 | NULL | 3
| 2 | NULL | service 2 | 2
| 7 | 2 | NULL | 1
| 8 | 2 | NULL | 2
+----------+-----------------+----------------------------------+---------------
Thanks!