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.
| Author |
Topic |
|
ygeorge
Yak Posting Veteran
68 Posts |
Posted - 2004-03-12 : 14:58:35
|
| Hi,I have a table for users name, the data is like this -UserID Name Department1 Tom A2 Sandy A3 James B4 Chris A...I want to add up the names for department A and get a result like this -'Tom, Sandy, Chris, ...'Is there an option out there, except for by using cursor, to carry it out? Is it possible to do it with one single query?Thanks in advance,George |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-12 : 15:06:41
|
| There is an article here about putting rows into a comma separated list. Search the articles for csv.Tara |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-03-12 : 15:09:48
|
| Dang, machine is slow right now that even I got sniped. Who would have thought?!Tara |
 |
|
|
ygeorge
Yak Posting Veteran
68 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2004-03-12 : 15:23:12
|
quote: Originally posted by tduggan Dang, machine is slow right now that even I got sniped. Who would have thought?!Tara
Snipage... I'm about to fall asleep at my desk......zzzzzzzzzzzzzzzzzzzzzBrett8-) |
 |
|
|
|
|
|