中易网

如何算出考勤天数?

答案:1  悬赏:70  
解决时间 2021-10-17 13:39
  • 提问者网友:愿为果
  • 2021-10-17 07:13
如何算出考勤天数?
最佳答案
  • 二级知识专家网友:零点过十分
  • 2021-10-17 08:46
你没描述得太清楚,不过大概意思明白了,暂定认为你的表里旷工天数为1表示旷工,你要查看的是2009年9月 可以这样写:select distinct 卡号 from 表 t where 旷工天数=1 and year(打卡日期)=2009 and month(打卡日期)=9 and exists(select * from 表 where 卡号=t.卡号 and 旷工天数=1 and 打卡日期=dateadd(d,1,t.打卡日期)) and exists(select * from 表 where 卡号=t.卡号 and 旷工天数=1 and 打卡日期=dateadd(d,2,t.打卡日期)) 返回满足条件员工的卡号
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息