Home All Groups Group Topic Archive Search About

String concatenation aggregate

Author
25 Aug 2006 1:24 PM
WebBuilder451
String concatenation aggregate UDF or a query that is not a CLR based function.

I have a customer table
customerid int, customername varchar
and a contacts table
contactid int, customerid int, emailaddress varchar, includeinlist bit

for each customer i want to return a list of emailaddresses.
cid1, name, email1, 2, 3
cid2, name, email1, 2
cid3, name, email1, 2, 3, 4, 5
....
Can it be done without using CLR?
I'm open to ideas.

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

Author
25 Aug 2006 1:40 PM
Anith Sen
Return the resultset to the client & display in the appropriate format. If
this is a general requirement and needs to be done at the server using
T-SQL, consider one of the approaches detailed at:
http://www.projectdmx.com/tsql/rowconcatenate.aspx

--
Anith
Author
25 Aug 2006 3:51 PM
WebBuilder451
Anith,
Thank you very much. I did not know about that artical nor that so many
alternatives existed. I can see how any of the optionswwould be resource
intensive. Code would be a better option, but i try to seprate design work
from logic when evver possible.
THANKS!
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


Show quote
"Anith Sen" wrote:

> Return the resultset to the client & display in the appropriate format. If
> this is a general requirement and needs to be done at the server using
> T-SQL, consider one of the approaches detailed at:
> http://www.projectdmx.com/tsql/rowconcatenate.aspx
>
> --
> Anith
>
>
>

AddThis Social Bookmark Button