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)
 String concatenation with an aggregate function.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-24 : 01:21:40
Matthew writes "Hi there.

I'm looking for a way of concatenating the results from a SELECT statement into a single column. It seems easy at first, identical to a SUM query but for strings. At first, I guess there was something similar to:

SELECT CONCAT(MY_COLUMN) as Concatenated_Column FROM My_Table GROUP BY My_Group

But it turns out there's no aggregate function for string concatenation (as far as I can tell). Any ideas?

Thanks.

Matt."

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-06-24 : 01:21:40
Yeah, search the site for CSV. Then modify that to concatenate without the comma.
Go to Top of Page
   

- Advertisement -