22,209
社区成员
发帖
与我相关
我的任务
分享
select surgeon_name,
sum(i.ItemPoint *sp.PrmValue * SYS_PARAM_3.PrmValue) as itempoint
from v_surgeryJournal j LEFT OUTER JOIN dbo.SERV_ClinicItem AS i ON i.ItemCode = j.ItemCode,
SYS_PARAM as sp, dbo.SYS_PARAM AS SYS_PARAM_3 where sp.PrmName = 'SAccountBase'
and SYS_PARAM_3.PrmName =(case surgernclass when '一助' then 'yzjx' when '主刀' then 'zdjx' end) and surgeon_name is not null
and IsNumeric(surgeon_name)=0 AND operatoin_time>='2016-04-30' and operatoin_time<='2016-05-30'
group by surgeon_name
select ‘第一人民医院’ as surgeon_name,
sum(i.ItemPoint *sp.PrmValue * SYS_PARAM_3.PrmValue) as itempoint
from v_surgeryJournal j LEFT OUTER JOIN dbo.SERV_ClinicItem AS i ON i.ItemCode = j.ItemCode,
SYS_PARAM as sp, dbo.SYS_PARAM AS SYS_PARAM_3 where sp.PrmName = 'SAccountBase'
and SYS_PARAM_3.PrmName =(case surgernclass when '一助' then 'yzjx' when '主刀' then 'zdjx' end) and surgeon_name is not null
and IsNumeric(surgeon_name)=0 AND operatoin_time>='2016-04-30' and operatoin_time<='2016-05-30'