JohnnyLong
Programmer
I have a Timesheet table which stores the employee names and week commencing dates for each timesheet (they are paid weekly). I need to see who has not received a timesheet in the last 4 weeks. Here is an example of my data:
Name TS Week
John Smith 06/11/2006
John Smith 30/10/2006
John Smith 23/10/2006
John Smith 16/10/2006
etc
Joe Bloggs 09/10/2006
Joe Bloggs 02/10/2006
Joe Bloggs 25/09/2006
Joe Bloggs 18/09/2006
etc
So in the above example John Smith has worked in the last 4 weeks but Joe Bloggs hasn't. I need my query results to show Joe Bloggs 09/10/2006 (his last timesheet). I'm guessing that I need to group my results, but I don't know how. Any ideas greatly appreciated.
Name TS Week
John Smith 06/11/2006
John Smith 30/10/2006
John Smith 23/10/2006
John Smith 16/10/2006
etc
Joe Bloggs 09/10/2006
Joe Bloggs 02/10/2006
Joe Bloggs 25/09/2006
Joe Bloggs 18/09/2006
etc
So in the above example John Smith has worked in the last 4 weeks but Joe Bloggs hasn't. I need my query results to show Joe Bloggs 09/10/2006 (his last timesheet). I'm guessing that I need to group my results, but I don't know how. Any ideas greatly appreciated.