all groups > sql server programming > february 2006 >
You're in the

sql server programming

group:

Select result as comma separated string


Re: Select result as comma separated string Anith Sen
2/14/2006 3:07:11 PM
sql server programming:
In general, a good approach is to bring the return the resultset to the
client and massage the data to appropriate display format.

If you really want to get this done in the server, for 2005, try:
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/7e5b4c8a9b9b968a

For 2000, try:
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/2d85bf366dd9e73e

--
Anith

Select result as comma separated string Henrik Skak Pedersen
2/14/2006 9:48:17 PM
Hi,

I would like to result a result like this:

CustomerName, Partners
"Test 1", "Partner 1, Partner 2, Partner 3"
"Test 2", "Partner 3"

I have two tables Customers and Partners with a join between then. Is it
possible to get the list of Partners as a comma separated string?

Thanks

Henrik Skak Pedersen

Re: Select result as comma separated string Henrik Skak Pedersen
2/15/2006 12:00:00 AM
Hi Anith,

Thanks very much that was just what I needed.

Thanks

Henrik.
[quoted text, click to view]

AddThis Social Bookmark Button