Here is something you can try, although it requires the use of a user defined function in order to accomplish the desired results.
1) Create a function that will return all the heads for a single manager. With the input parameter 'Chris', the function returns 'A,C,E'.
Here is a rough example:
CREATE FUNCTION dbo.GetHeadsList
(@Person VARCHAR(50))
RETURNS varchar(255)
AS
BEGIN
DECLARE @HeadsList AS varchar(255)
SET @HeadsList = ''
SELECT @HeadsList = @HeadsList + [ManagerHeads].Heads + ','
FROM
(SELECT MGR.HEADS
FROM MGR
WHERE (Manager = @Person )) [ManagerHeads]
IF LEN(@HeadsList) = 0
-- Set to NULL if there is no row exist in MGR for Person (Person is not a manager?)
SET @HeadsList = NULL
ELSE
-- Remove trailing comma
SET @HeadsList = LEFT(@HeadsList, LEN(@HeadsList) - 1)
RETURN @HeadsList
END
2) The query to get the desired results would look something like:
SELECT DISTINCT MGR.Manager [MANAGER], dbo.GetHeadsList(MGR.Manager) [HEADS]
FROM MGR
I'm not sure if this meets your requirements or if this is even an efficient or practical solution, but maybe it will lead to something usable.
John