create table timetable( work_date date, tech_id int,
block_1_firsthalf_start_time datetime, block_1_end_time datetime,
block_2_secondhalf_start_time datetime, block_2_end_time datetime,
block_3_over_time datetime, block_3_over_end_time datetime,
block_4_first_break_start_time datetime, block_4_first_break_end_time datetime,
block_5_second_break_start_time datetime, block_5_second_break_end_time datetime)
insert into timetable values(
'8/6/2013', 1,
'8/6/13 6:00 AM', '8/6/13 10:00 AM',
'8/6/13 11:00 AM', '8/6/13 6:00 PM',
'8/6/13 6:30 PM', '8/6/13 8:00 PM'
'8/6/13 7:00 AM', '8/6/13 8:00 AM',
'8/6/13 5:00 PM', '8/6/13 5:30 PM')
another table:
create table jobtable(tech_id int,Job_starting_time datetime, Job_end_time datetime)
insert into jobtable values(1, '8/6/13 7:00 AM','8/6/13 8:00 AM')
Now need to find free time in a day for the employee.pl share how can we make it.