This is very complex and so Im not quite sure how to describe it properly so forgive me if its not understandable and please feel free to ask any questions.
All comments and ideas are greatly appreciated.
I am creating a database to capture outages on our computer systems. The way it works is that for every outage we enter into the database the start date, start time, end date & end time and a load of other info which is not applicable to my question.
What i want to do then is to run a report based on any date range, the user will give a start and end date for the report to show. It uses another table to show the potential availability, however what I want to do is show actual availablity.
This is where I am having problems, I need to get the amount of hours the system was unavailable for, if it was. what needs to be taken into account is the following scenarios:
1.) the date range I am reporting on is within the outage start and end dates
2.) the outage start and end dates are within the reporting dates
3.) the outage dates run on after the reporting end date and so I don't need to include all the outage time in the report only what i am requesting on the report
4.) the outage dates start before the reporting start date and so I don't need to include all the outage time in the report only what i am requesting on the report
I have, as i have mentioned, a table which shows system avilablity. this display the potential hours for each day, so for example if the system was down for 3 days you could get the number of hours per day from this table. However if it was a 1/2 day involved, e.g. the system came up at 12:00, or 13:00 then these hours need to be worked out a different way.
The potential hours table is structured as the following:
System ¦ Monday ¦ Tuesday ¦ Wednesday ¦ Thursday ¦ Friday ¦ Saturday ¦ Sunday
The number of hours the system is available for on these days is displayed in the fields below the days.
If any of my tables need to be altered i don't mind.
I consider my self very lucky if I get any help with this one as it is probably very hard to understand.
Thanks at least for taking the time to read it through and think about it.
Many Thanks All
Tim
All comments and ideas are greatly appreciated.
I am creating a database to capture outages on our computer systems. The way it works is that for every outage we enter into the database the start date, start time, end date & end time and a load of other info which is not applicable to my question.
What i want to do then is to run a report based on any date range, the user will give a start and end date for the report to show. It uses another table to show the potential availability, however what I want to do is show actual availablity.
This is where I am having problems, I need to get the amount of hours the system was unavailable for, if it was. what needs to be taken into account is the following scenarios:
1.) the date range I am reporting on is within the outage start and end dates
2.) the outage start and end dates are within the reporting dates
3.) the outage dates run on after the reporting end date and so I don't need to include all the outage time in the report only what i am requesting on the report
4.) the outage dates start before the reporting start date and so I don't need to include all the outage time in the report only what i am requesting on the report
I have, as i have mentioned, a table which shows system avilablity. this display the potential hours for each day, so for example if the system was down for 3 days you could get the number of hours per day from this table. However if it was a 1/2 day involved, e.g. the system came up at 12:00, or 13:00 then these hours need to be worked out a different way.
The potential hours table is structured as the following:
System ¦ Monday ¦ Tuesday ¦ Wednesday ¦ Thursday ¦ Friday ¦ Saturday ¦ Sunday
The number of hours the system is available for on these days is displayed in the fields below the days.
If any of my tables need to be altered i don't mind.
I consider my self very lucky if I get any help with this one as it is probably very hard to understand.
Thanks at least for taking the time to read it through and think about it.
Many Thanks All
Tim