HelloWorld 善战者,求之于势,不责于人;故能择人而任势。

知止而后有定,定而后能静,静而后能安,安而后能虑,虑而后能得。物有本末,事有终始。知所先后,则近道矣。

  BlogJava :: 首页 ::  :: 联系 ::  :: 管理 ::
  167 随笔 :: 1 文章 :: 40 评论 :: 0 Trackbacks
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>

posted on 2013-01-17 01:24 helloworld2008 阅读(257) 评论(0)  编辑  收藏 所属分类: SQL

只有注册用户登录后才能发表评论。


网站导航: