query employees

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a query that returns the names of employees that have NOT
received a paycheck since a certain date.

My primary table is Emp_Main where I store EmpKey, LastName and FirstName.
My secondary table would be Emp_CheckHistory where I store EmpKey and PayDate.

Can anyone help me create this query?

Thank you in advance.
 
Try these two queries and edit the prompt as you like ---
[DW-WD_1] ---
SELECT Emp_CheckHistory.EmpKey, Max(Emp_CheckHistory.PayDate) AS MaxOfPayDate
FROM Emp_CheckHistory
GROUP BY Emp_CheckHistory.EmpKey;

SELECT Emp_Main.EmpKey, Emp_Main.LastName, Emp_Main.FirstName
FROM Emp_Main LEFT JOIN [DW-WD_1] ON Emp_Main.EmpKey = [DW-WD_1].EmpKey
WHERE ((([DW-WD_1].MaxOfPayDate)<[Enter paycheck date]))
GROUP BY Emp_Main.EmpKey, Emp_Main.LastName, Emp_Main.FirstName;
 
Back
Top