Possible Duplicate:
Combine multiple results in a subquery into a single comma-separated value
I have a query that returns a person object and needs to also return an organisations column which contains a comma separated list of organisations. My current query is below:
SELECT
p.PersonID,
p.Title,
p.FirstName,
p.LastName,
p.DateOfBirth,
p.EmailAddress,
p.MobileNumber,
p.EntityID,
(SELECT o.Name FROM Entities.Organisations o
JOIN Entities.OrganisationPeople op ON o.OrganisationID = op.OrganisationID AND op.PersonID = p.PersonID) AS 'Organisations'
FROM
Entities.People p
This is fine when there is one organisation attached to a person, but I might as well just do a standard join. I want to return possibly more than one result in the organisations column with a comma separated list.
Is this even possible?