“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
Of course there is more to it, what if the startdate is a Thursday and the end day a Wednesday, or what if it spans more that 1 week, what if there is a holiday in between?
You could create a day table with valid days only and join on that table and have an additional field with 8 hours in it (or 4 hours for half days)
This way you can sum on that field, just a suggestion
“I sense many useless updates in you... Useless updates lead to defragmentation... Defragmentation leads to downtime...Downtime leads to suffering..Defragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
I do have a bank holidays table, but I dunno whether or not to use it yet, there are about a million records in the main table and the more calculations i do on it the longer it takes to process
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.