select count(考勤ID ) from clock where 考勤类型=迟到 迟到的人数
select count(考勤ID ) from clock where 员工ID=55 and 考勤类型=迟到 55迟到的次数
谢谢各位 我要实现把公司全体员工本月所有的考勤记录全安员工和考勤类型分别显示出来. 出现员工ID 迟到 早退 加班 55 2 1 2 ///2,1,2表示次数 6 1 1 2 select count(考勤ID ) from clock where 员工ID=55 and 考勤类型=迟到 55迟到的次数 这样只能取一个值?
select select count(考勤ID) from clock where 员工ID=55 and 考勤类型=迟到 , select count(考勤ID) from clock where 员工ID=55 and 考勤类型=早退, select count(考勤ID) from clock where 员工ID=55 and 考勤类型=加班 from clock
每次insert的时候,比如insert "3 55 迟到 2005年6月5日"
然后update 另一个表 判断哪个员工,迟到还是早退,把相应的数值+1
在存储过程中用事务处理操作一下
迟到的人数
55迟到的次数
我要实现把公司全体员工本月所有的考勤记录全安员工和考勤类型分别显示出来.
出现员工ID 迟到 早退 加班
55 2 1 2 ///2,1,2表示次数
6 1 1 2 select count(考勤ID ) from clock where 员工ID=55 and 考勤类型=迟到
55迟到的次数
这样只能取一个值?
select count(考勤ID) from clock where 员工ID=55 and 考勤类型=早退,
select count(考勤ID) from clock where 员工ID=55 and 考勤类型=加班
from clock