I would like to extract the data from the query below and combine all the email addresses, separated by a semicolon, grouped by employee name.
SELECT
DISTINCT
p.email
, e.name
FROM
PERSON p
INNER JOIN
EMPLOYEE e
ON
p.agentofrecord_id = e.employee_id
WHERE
dbo.GetPersonMember(p.person_id) = 1
AND (p.isactive = 1)
AND p.email <> ''
ORDER BY name
source
share