Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Group but combine field

Author  Topic 

jandh98
Starting Member

10 Posts

Posted - 2010-11-03 : 08:53:56
Is it possible to do this?

Here's my current query:

select
DP.Number,
BL.Age

from
dependentonly dp
left outer join birthdaylist bl on dp.entityid = bl.entityid


Order By DP.Number

My results are:

Number Age
0100 20
0200 25
0200 37
...

As you can see, I have multiple numbers and I would like to group by them and get the following results:

Number Age
0100 20
0200 25, 37

Can I do this?

TIA!
Heather

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-03 : 09:04:41
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -