I did a left outer join between two tables. The order number is split into different classes. When I return data, the order number lists multiple line items for each Class, like so:
Order Class
1 25
1 26
1 27
2 32
2 33
I'd like to make it so it lists the one order number and then puts the classes together in a list like so:
Order Class
1 25, 26, 27
2 32, 33
Sample code:
Is there a way to do this?
Order Class
1 25
1 26
1 27
2 32
2 33
I'd like to make it so it lists the one order number and then puts the classes together in a list like so:
Order Class
1 25, 26, 27
2 32, 33
Sample code:
Code:
SELECT
vtr.Date,
vtr.Order Number,
ted.Class
FROM Data.dbo.viewTransReporting vtr
LEFT OUTER JOIN Data.dbo.tblEDI ted ON (vtr."Order Number"=ted.intOrderNbr)
Is there a way to do this?