我将员工出勤情况存储在具有以下结构的表“出勤率”上:
EmpID, CDate
考勤系统每天都会插入此表,其中包含当天在场的所有员工的员工 ID。
我需要找出特定员工的缺勤陈述。我可以通过选择所有不在员工所在日期的不同日期轻松地做到这一点。
有什么方法可以删除该 sql 语句中的 not in 运算符。请帮忙
这是对 EmpId 01 的员工的 sql 查询:
select distinct CDate
from attendance
where CDate not in (
Select CDate from attendance where EmpID='01')