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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing multiple columns into one row

Status
Not open for further replies.

bradth

IS-IT--Management
Feb 18, 2005
142
CA
I am currently trying to pull data from a SQL table and the data that is stored in the table is listed as such:

SOPNUMBE SOPTYPE Tracking Number
------------------------------------------------
ORDSTD000100 2 12345
ORDSTD000100 2 12346
ORDSTD000100 2 12347
ORDSTD000101 2 56788
ORDSTD000101 2 56789

What I would like to do is create a small query or select statement that would format the data like this:

SOPNUMBE SOPTYPE Tracking Number
------------------------------------------------
ORDSTD000100 2 12345, 12346, 12347
ORDSTD000101 2 56788, 56789

Anyone have any ideas of how to go about doing this? Thanks.

Brad [spidey]

 
Small - forget it. :(

Two common tricks used to denormalize data per group are explained here: thread183-1047450.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top