Display missing days in query

  • Thread starter Thread starter Lawlee
  • Start date Start date
L

Lawlee

Hi there,

I'm busy with a time and attendance database for my company.
I have a query that retrieves the days that the employees worked. eg.
Mon - Fri.

So if the person did not work eg. Monday and Thusday... What can I do
to display only the days that they didn't work. The days they didn't
work won't be visible when I run my current query. Only Tuesday,
Wednesday and Friday will be the result of my current query.

Thanks
Lawlee
 
If you have a calendar table, or even a table listing all the week days, you
can use it in the join:

SELECT MyTable.DateField1
FROM MyTable LEFT JOIN TableCalendar ON MyTable.DateField1 =
TableCalendar.DateField2
WHERE (((MyTable.DateField1) Not In ([DateField2])));
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top