I have a make table that figures daily pride and assigns the current date to each line. I want to be able to run a query to pull all pride numbers from 06/01/2016 to 06/30/2016 and then run a query to find the dates in which there was no pride information entered if we could factor out weekends that would be even better.

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


In your code, create a table [CalendarBusinessDay] with columns [CalendarDate] as Date/Time and [BusinessDay] as Yes/No where weekend dates are False. Add the appropriate month's data with a simple code loop.

Run this query:

left join MyTable
    on CalendarBusinessDay.CalendarDate = MyTable.MyDate
where CalendarBusinessDay.BusinessDay = True
    and MyTable.MyDate is null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.