Advertisement

06.28.2007 at 01:45PM PDT, ID: 22665396 | Points: 50
[x]
Attachment Details

concatenate the string result of a grouping... possible?

Asked by somear in MS SQL Server

Tags: concatenate, concat, string

is there a way to concatenate the results of a string field like the way sum(field) is used when grouping?

e.g. I want to do something like this...
select c.country, sum(y.city_pop)
from country c
join city y on c.id = y.cid
group by country

with strings....
e.g.
select c.country, **CONCAT*** (y.city)  //some concatenation possible
from country c
join city y on c.id = y.cid
group by countryStart Free Trial
[+][-]06.28.2007 at 01:48PM PDT, ID: 19384681

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.19.2008 at 02:08AM PDT, ID: 21820483

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.01.2008 at 02:55PM PDT, ID: 22363019

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32