Query All Employees Who Have Not Logged In for the Day

jrsarrat

New Member
Joined
Jul 8, 2018
Messages
29
Greetings!

I have produced a query that shows only the names of employees who have not logged in. But, I want the query to also only give me the employees who have not logged in for the current date = Date().

How do I incorporate that into this query I have already produced :

SELECT *
FROM Emp_tbl AS e
WHERE NOT EXISTS
(select null from tblEmpLogin t where t.pf_id = e.pf_id);

The date field 'DTE' is in table tblLogInOut.

Thank you for your help!
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,612
Office Version
365
Platform
Windows
Your query references table "Emp_tbl" and "tblEmpLogin", but the you say that the date field is in the "tblLogInOut" table.

I think you need to tell us the structure and relationships of all three of these tables (how they relate to each other).
And perhaps post some sample data. I am most interested as to what the data looks like in the table that shows whether or not they have logged in.
 

Watch MrExcel Video

Forum statistics

Threads
1,101,774
Messages
5,482,850
Members
407,366
Latest member
Rofsal

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top