with TestTitle AS (select distinct Professional_name, member from sys_MemberOfRole,
(SELECT Professional_code,Professional_name,Professional_name+'指标填报人' AS RN,Professional_manager FROM bm_professional WHERE Professional_status=1
AND Professional_code NOT IN (SELECT professional_code FROM bm_report_status WHERE status <> 0 AND object_code=15074 AND time_code='MO201211')) t
where rolename=t.RN and member in(select member from bm_menberofobject where objectForUser=15074))
SELECT Professional_name, STUFF(( SELECT',' + member FROM TestTitle subTitle WHERE Professional_name = TestTitle.Professional_name
</script>