Hi, I'm trying to count consecutive data in this table:
EmplNo Day Code
1 1 Sick
1 2 Sick
1 5 Sick
1 6 At work
1 7 Sick
2 1 Sick
2 2 At work
2 3 Sick
2 6 At work
2 7 Sick
I want to know how many consecutive sick incident we have per employee. The result should be like that:
EmpNo Incidence
1 2
2 3
Employee 1 was sick 3 days in a row even if there was a weekend on day 4 and 5 (I dont have any data in my table for the day off)
How can I create a query to calculate the number of incidence per employe? I have already tried to find a solution in the previous post but I haven't found any answer.
Frank
EmplNo Day Code
1 1 Sick
1 2 Sick
1 5 Sick
1 6 At work
1 7 Sick
2 1 Sick
2 2 At work
2 3 Sick
2 6 At work
2 7 Sick
I want to know how many consecutive sick incident we have per employee. The result should be like that:
EmpNo Incidence
1 2
2 3
Employee 1 was sick 3 days in a row even if there was a weekend on day 4 and 5 (I dont have any data in my table for the day off)
How can I create a query to calculate the number of incidence per employe? I have already tried to find a solution in the previous post but I haven't found any answer.
Frank