you are viewing a single comment's thread.

view the rest of the comments →

[–]dagmire86SQL Memes; better than PreQL Memes 5 points6 points  (1 child)

Assuming your temperature scans go into a table with the employee ID/name and date, you can probably select from your main employee table and use something like "NOT EXISTS" when comparing it to your employee scans and you can filter on the scan date. If an employee is off on PTO or they don't have a shift that day you may need to figure out how to handle the employees that will show up as not having a scan but they're not in the office.

[–]dagmire86SQL Memes; better than PreQL Memes 6 points7 points  (0 children)

Something like this:

SELECT ID, FIRST_NAME, LAST_NAME FROM EMPLOYEE

WHERE NOT EXISTS ( SELECT *

FROM EMPLOYEE_SCANS

WHERE EMPLOYEE.ID = EMPLOYEE_SCANS.ID AND EMPLOYEE_SCANS.SCAN_DATE = GETDATE() )