I have data table like this:-
OrderNo OrderLine SerialNo
123 10 45
123 10 46
456 10 22
and I need query to concatenate serial nos to produce this result in grouping query:-
Order No Order Line SerialNos
123 10 45 46
456 10 22
I could write function to loop through records and string the serial nos together, but does anyone know an easier way in sql?
My data has up to 32 serial nos against each order/line.
OrderNo OrderLine SerialNo
123 10 45
123 10 46
456 10 22
and I need query to concatenate serial nos to produce this result in grouping query:-
Order No Order Line SerialNos
123 10 45 46
456 10 22
I could write function to loop through records and string the serial nos together, but does anyone know an easier way in sql?
My data has up to 32 serial nos against each order/line.