Dates

  • Thread starter Thread starter J P Singh
  • Start date Start date
J

J P Singh

I have a table in access where I store the dates that our employees have
booked off as holidays.

I want to run a query to find out which employees have not booked 29th -
31st Dec as their day off.

Can this be done?

The table structure is

EmpNumber
DateFrom
DateTo

Thanks in advance
 
Select empnumber from [youremployetable] where not empnumber in (select
datefrom >= 12/29/2003 and dateto <= 12/31/2003)

hope this helps
 
sorry correction

Select empnumber from [youremployetable] where not empnumber in (select
empnumber from holidaytable where datefrom >= 12/29/2003 and dateto <=
12/31/2003)

hope this helps
 
Hi Craig

I didn't get the question right.

There are two tables

Employee Profile which has empnumber, firstname, lastname etc...

HolidayRequests which has empnumber, datefrom, dateto

I guess the the solution below will only work for people who have booked any
holiday at all.




Craig Ison said:
sorry correction

Select empnumber from [youremployetable] where not empnumber in (select
empnumber from holidaytable where datefrom >= 12/29/2003 and dateto <=
12/31/2003)

hope this helps

J P Singh said:
I have a table in access where I store the dates that our employees have
booked off as holidays.

I want to run a query to find out which employees have not booked 29th -
31st Dec as their day off.

Can this be done?

The table structure is

EmpNumber
DateFrom
DateTo

Thanks in advance
 
Back
Top