Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help

Author  Topic 

mukejee
Starting Member

5 Posts

Posted - 2014-02-19 : 04:51:06
Hi,

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?

Thanks
Mus



   

- Advertisement -