SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 02/19/2014 :  04:51:06  Show Profile  Reply with Quote

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?


  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000