select e.empid
from employee e
where not exists
(
select *
from login x
where x.empid = e.empid
and x.logindate >= dateadd(day, datediff(day, 0, getdate()), -5)
and x.logindate <= dateadd(day, datediff(day, 0, getdate()), -1)
)
KH
Time is always against us