Query Design Problem - Advice?

leejevans

New member
Local time
Today, 16:46
Joined
Nov 22, 2006
Messages
8
Hi all,

I have a table of employee sickness / absence records with the following structure and data:


TBL_SICKNESS.gif


I have figure out how to write a query which displays the number of days taken for each sickness (END_DATE minus START_DATE).

QRY_DAYS.gif


My problem is that I would to write a query to display the number of days taken for each of the 12 months of the year.

In the example of Employee 4 their sickness spans two different months, I can't get my head around how to produce the correct result which should look like:-

OUTPUT.gif


The only way I can think of doing it is by recording each day of sick individually rather than just the start and end days?

ANY input / comments / observations would be greatfully received!

Thanks
 
Last edited:
What if start date is January and finish date is March

Hi, in that case I would like to display the number of days during JAN, FEB and MAR.

Hope that helps?
 

Users who are viewing this thread

Back
Top Bottom