I tried lots of query to get the EmployeeID where no attendance on the date I want to check who are the absentee.

I just want to select the EmployeeId where no LOG_TIME with the date 2013-05-02

attendance_log table is the table where the time in and out was save.

I hope somebody can help me to get only the EmployeeId with no attendance where Sub = 'REG' and Department IN ('QA', 'Engineering', 'Assembly').

Thank you

r937
—
2013-05-15T00:57:56Z —
#2

do you remember the LEFT OUTER JOIN with IS NULL check?

SELECT emp.employeeid
FROM employees AS emp
LEFT OUTER
JOIN attendance_log AS att
ON att.emp_id = emp.employeeid
AND att.log_time = '2013-05-02'
WHERE emp.sub = 'REG'
AND emp.department IN ('QA', 'Engineering', 'Assembly')
AND att.emp_id IS NULL

newphpcoder
—
2013-05-15T01:04:59Z —
#3

Thank you for your suggested query. I tried it and my sql was not responding.

r937
—
2013-05-15T01:08:24Z —
#4

newphpcoder said:

I tried it and my sql was not responding.

oh, that's too bad

newphpcoder
—
2013-05-15T01:10:31Z —
#5

It ends as not responding because i think the sql cannot load the query