>I actually have the time broken down to blocks of 15 minutes where 12:00AM to 12:15 as block 1, 12:15AM to 12:30AM as block 2, 12:30AM to 12:45 as block 3 etc.. The days worked are broken down to a week number and day number since 01/01/2000 (Monday is day 1)
>
>so my table looks like
fk_employee fk_week fk_day fk_timein fk_timeout
1234 395 1 58 62
1234 395 1 64 74
>So in this case we would have a 30 minute lapse time
>
>
(representing 7/21/2008 from 1:45PM to 2:45PM;
> which is 4 15 minute intervals or a total of 1hr)
(representing 7/21/2008 from 3:15PM to 5:45PM)
> which is 10 15 minute intervals for a total of 1.5hrs)
Can you first transform this table into something readable (the structure suggested by Yelena) and then it would be easy to deal with.
E.g. transform fk_week, fk_day, fk_timein, fk_timeout into
EmployeeID TaskDate TaskID StartTime EndTime
If it's not broken, fix it until it is.
My Blog