I have the following:
OrderID | Articlenumber|
--------+--------------+
1       | 123          |
2       | 222          |
1       | 799          |
1       | 987          |
2       | 444          |
3       | 212          |
2       | 222          |
1       | 898          |
and I want the following (sum up all article numbers per orderID):
orderID|articelnumber       |
-------+--------------------+
1      |123, 799, 987, 898  |
2      |222, 444, 222       |
3      |212                 |
or:
orderID|articelnumber|articelnumber|articelnumber |articelnumber |
-------+-------------+-------------+--------------+--------------+
1      |123          |799          |987           | 898          |
2      |222          |444          |222           |              |
3      |212          |             |              |              |
How can I do it with SQL-Server? The number of articles per orderID is variable.
Thanks a lot!
 
     
    