Our database (purchased software) uses an outline number scheme to arrange data. The problem is I can't figure out how to get the subtask data to rollup to the parent tasks (subtotals) and the subtotals to rollup to the project total. A sample outline would look like this:
Outline# Task Name Hours
0 Proj Name
1 Task 1
1.1 Sub task 1 hrs 4
1.2 Sub task 2 hrs 2
1.3 Sub task 3
1.3.1 Sub task 3 sub 1 1 hrs 1.5
1.3.2 Sub task 3 sub 2 hrs 6
2 Task 2
2.1 Sub task 2
2.1.1 Sub task 2 sub 1 hrs 2
I can do an outer join between the project table and the time table to bring in all the tasks and hours, but i can't figure out how to get the subtasks to subtotal at the task level and the tasks to total at the project level.
In the above ex. I need 2.1 to show the 2 hrs, 2 to show the 2 hours, 1.3 to show the 7.5 hrs, 1 to show 13.5 hours, and 0 to show 15.5 hrs. Projects can have 1,000 tasks/subtasks and can go 6 levels deep. i am thinking some type of multiple loop using wildcards but i don't know where to start. Is there some built in function that would handle something like this?
Thanks,
Alan