Hi Everyone,
I also posted this under Oracle, but I know more about SQL Server, os it should be easy to translate any differences...
I have something like the following...
Date ........ Hours ........ 980X
03/08/13 ........ 4 ........ 98
03/08/13 ........ 2 ........ AM
03/08/13 ........ 2 ........ NULL
03/08/13 ........ 3 ........ PM
03/15/13 ........ 2 ........ 98
03/15/13 ........ 3 ........ AM
03/15/13 ........ 2 ........ NULL
I will have a set for each date in the week; however, for simplicity, I just included Friday as that is the one I am having trouble with.
The problem I am having is that I need to sum all the totals for the week and calculate overtime, if it exists. So, on the first week, you can see the various values. If the value is 98, Am, or null, it is summed for the current week. However, if it is PM, it is added to the following week instead.
Any help with this would be great.
Thanks and let me know if you need any other information.
Neal
I also posted this under Oracle, but I know more about SQL Server, os it should be easy to translate any differences...
I have something like the following...
Date ........ Hours ........ 980X
03/08/13 ........ 4 ........ 98
03/08/13 ........ 2 ........ AM
03/08/13 ........ 2 ........ NULL
03/08/13 ........ 3 ........ PM
03/15/13 ........ 2 ........ 98
03/15/13 ........ 3 ........ AM
03/15/13 ........ 2 ........ NULL
I will have a set for each date in the week; however, for simplicity, I just included Friday as that is the one I am having trouble with.
The problem I am having is that I need to sum all the totals for the week and calculate overtime, if it exists. So, on the first week, you can see the various values. If the value is 98, Am, or null, it is summed for the current week. However, if it is PM, it is added to the following week instead.
Any help with this would be great.
Thanks and let me know if you need any other information.
Neal