Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left Outer Data On One Row 1

Status
Not open for further replies.

briesen

Technical User
May 13, 2008
24
US
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:

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top