select b.code 工號,b.cnname 中文名,sum(QuartersHours/60) 總工時
from AttendanceRollcall as a ,employee as b
where a.date >= (SELECT DATEADD(week, DATEDIFF(week, '', getdate()), -1))
and a.date <= (SELECT DATEADD(week, DATEDIFF(week, '', getdate()), 5))
and a.employeeid=b.employeeid
and attendancetypeid='R137116f301e133a094958aa5b6c430923b0ef'
group by b.cnname,AttendanceTypeId,b.code
having sum(QuartersHours/60) > 40;

創作者介紹
創作者 半個靈魂...真正的悲傷 是心的幫浦嘶嘶空轉的聲響 旁人看不出來 也聽不見 的頭像
vernal9

半個靈魂...真正的悲傷 是心的幫浦嘶嘶空轉的聲響 旁人看不出來 也聽不見

vernal9 發表在 痞客邦 留言(0) 人氣( 18 )