Now I want to break up the above schedule in actual available minutes depending upon the available/non-available schedule of the internet services for the month of january. Note that schedule 2 and 3 overlap schedule number 1.
Please have a look at the attachment: output.txt if the original and expected output are not clearly visible/formated.
Please note how the schedules for records between 15-Jan-2009 and 20-Jan-2009 have been broken into multiple records depending upon the non-availability time of the internet services. The same concept have been applied for the records between 24-Jan-2009 and 26-Jan-2009.
The above expected result is for display/reporting purpose. Hence cannot tweak around with the requirements.
Any help in terms of query or algorithms would be highly appreciated.