Posted - 02/19/2014 : 04:51:06
I am having the following scenario.
shift master table
Role Facility Starttime Duration Minimum Staff count
1 A 10AM 5hrs 3
2 A 10AM 3hrs 2
Employee detail table
EmpID Role Facility Starttime Endtime duration
1 1 A 10AM 12PM 2hrs
2 1 A 10AM 10:15AM 0.25hrs
3 1 A 11AM 1PM 2hrs
I want to compare the data from the 2nd table against 2nd table that for a "Role" and "Facility" the minimum staff criteria is met or not?
little more explaination.From 2nd table we can see,between
10-12 crieria not met beacause the emp count is 1 which is not equal to 3 mentioned above.
How to handle this scenario?