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 2000 Forums
 SQL Server Development (2000)
 How to combine rows into one column

Author  Topic 

memarcie
Yak Posting Veteran

91 Posts

Posted - 2007-08-09 : 14:34:01
I'm trying to query providers and their specialties however a provider may have more than one specialty
ie:
prov_num Specialty
1 pediatrics
2 acute
2 radiology
3 dentistry


I want to query each provider and then list their specialties after the provider num. so I want to see
1 pediatrics
2 acute, radiology
3 dentistry

I've done something like this a while ago, but can't remember how to do it now or what it is even called so I don't know what to search on. (derived column maybe?)

Thanks for your help!

Marcie

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-09 : 15:13:29
There are function for CONCAT available here at SQLTeam.
You can find them here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -