Hello i am trying to figure out how to do this i have a mysql table
| ID | ACC_ID | line_id | code |
| 1 | 1 | 5960 | DCA |
| 2 | 1 | 5960 | AAA |
| 3 | 1 | 5960 | DDD |
| 4 | 1 | 5960 | DER |
| 5 | 1 | 5054 | DCB |
| 6 | 1 | 5054 | AAC |
| 7 | 1 | 5011 | DDE |
| 8 | 1 | 5012 | DEQ |
etc the database goes down about 10000 lines
I would like to make a mysql select statement that will do this
| ACC_ID | line_id | code | code | code | code |
| 1 | 5960 | DCA | AAA | DDD | DER |
| 1 | 5054 | DCB | DER | | |
| 1 | 5011 | DDE | | | |
| 1 | 5012 | DEQ | | | |
there could be up to ten codes per line_id
Now my question is it possible to make the query above using a select statement.
Thank you all for your help