in our v12.06 (MS SQL) system there is a function: z_get_collab_mangrs which gives you a delimited list of CMs when you pass it a project's internal ID.
It's not something I've developed so I'm guessing it's a custom thing that was built for us sometime in the past. Here's the code if you want it
[size=3]CREATE FUNCTION [niku].[Z_GET_COLLAB_MANGRS] (@v_id_project NUMERIC)
RETURNS NVARCHAR(1000)
AS
BEGIN
DECLARE c_coll_manas CURSOR FOR
select srm.full_name
from clb_project_participants_v vp, srm_resources srm, prj_projects prj
where vp.project_id=@v_id_project and vp.is_project_manager=1
and vp.resource_id=srm.id AND vp.project_id=prj.prid
and vp.user_id<>prj.manager_id and vp.user_id<>1
union
select srm.full_name
from srm_resources srm ,prj_projects prj
where prj.prid=@v_id_project and prj.manager_id=srm.user_id
DECLARE @v_name_string NVARCHAR(400),
@v_col_man NVARCHAR (1000)
SET @v_col_man= ''
OPEN c_coll_manas
FETCH NEXT FROM c_coll_manas INTO @v_name_string
WHILE (@@FETCH_STATUS <> -1)
BEGIN
SET @v_col_man = @v_col_man + @v_name_string + ' & '
FETCH NEXT FROM c_coll_manas INTO @v_name_string
END
select @v_col_man = substring(@v_col_man,1,len(@v_col_man)-2)
CLOSE c_coll_manas
DEALLOCATE c_coll_manas
RETURN @v_col_man
END[/size]