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)
 Using String concatenation as a aggregate function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-20 : 08:09:39
Rajesh Agarwal writes "I have a query which returns me a output like this :

Col1 Col2
Group1 UserA
Group1 UserB
Group2 UserC
Group2 UserD

I want some method that should return me the output like this :

Col1 Col2
Group1 UserA,UserB
Group2 UserC,UserD

If i don't want to use temp tables, is there any other way to accomplish the above.

Waiting for ur Reply"

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-02-20 : 08:27:56
There is lots of sample code for this at this site.

Search for cross tabs
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-02-20 : 08:39:29
Converting Multiple Rows into a CSV String (Set Based Method)
Be sure to check out byrmol's function in the comments on that article.

Jay White
{0}
Go to Top of Page
   

- Advertisement -