bakerboy_1111
Registered User.
- Local time
- Today, 09:06
- Joined
- Dec 1, 2003
- Messages
- 43
I'm trying to create query based on a tree diagram.
I have a table with the following info: "Upstream_Feed", "Level_No", Tag_Number" and "Power".
Upstream_Feed - ID (Tag_Number) of level connected directly above
Level_Number - current level number (top = 0, next is 1 etc..)
Tag_Number - current level ID
Power - power value
Via this info one can construct the layout of the tree diagram. The purpose is to sum the powers at each level all the way to the top level. I will only enter the power levels manually for the very bottom levels of the tree diagram.
My idea is to create a query that checks to see if the power value is null (which corresponds to all levels except the bottom level). Out of these levels I would like to sum the powers from all the levels where the "Upstream_Feed" equals the current "Tag_Number", and store this value in the "Power" entry.
Does anybody know what code can I use to do this?
Any help is greatly appreciated.
Bakerboy
I have a table with the following info: "Upstream_Feed", "Level_No", Tag_Number" and "Power".
Upstream_Feed - ID (Tag_Number) of level connected directly above
Level_Number - current level number (top = 0, next is 1 etc..)
Tag_Number - current level ID
Power - power value
Via this info one can construct the layout of the tree diagram. The purpose is to sum the powers at each level all the way to the top level. I will only enter the power levels manually for the very bottom levels of the tree diagram.
My idea is to create a query that checks to see if the power value is null (which corresponds to all levels except the bottom level). Out of these levels I would like to sum the powers from all the levels where the "Upstream_Feed" equals the current "Tag_Number", and store this value in the "Power" entry.
Does anybody know what code can I use to do this?
Any help is greatly appreciated.
Bakerboy