G
gumby
I have a leave table with a StartDate and an EndDate field for leave
requests. I can count how many people are gone if they only are gone
for one day, but if it is a range I would like to be able to query
them and it show me how many people are gone on a given day.
Example:
RecordID, StartDate, EndDate
1, 01/01/2009,01/03/2009
2,01/01/2009,01/04/2009
3,01/01/2009,01/02/2009
4,01/01/2009,01/01/2009
I would like the query to tell me that
LeaveDate 1/1/2009, 1/2/2009, 1/3/2009, 1/4/2009
OnLeave 4 3 2 1
I was thinking about how I could break the days out in between the
dates that had ranges and then count them. Not sure how to do this. I
also do not what to have people put in individual dates for leave
requests that are greater than one day.
Thanks,
requests. I can count how many people are gone if they only are gone
for one day, but if it is a range I would like to be able to query
them and it show me how many people are gone on a given day.
Example:
RecordID, StartDate, EndDate
1, 01/01/2009,01/03/2009
2,01/01/2009,01/04/2009
3,01/01/2009,01/02/2009
4,01/01/2009,01/01/2009
I would like the query to tell me that
LeaveDate 1/1/2009, 1/2/2009, 1/3/2009, 1/4/2009
OnLeave 4 3 2 1
I was thinking about how I could break the days out in between the
dates that had ranges and then count them. Not sure how to do this. I
also do not what to have people put in individual dates for leave
requests that are greater than one day.
Thanks,