Reputation: 5597
I have a Self-join(parent/child) table that forms a TreeView control. in this structure only leaf nodes has a [Percent] value(persists in table only for leafs). and parent nodes values calculated from children(average values of children = parent [Percent] value).
How to write a procedure or function to calculate every node [Percent] values? any suggestions? i am beginner in sql and not familiar enough in sql statements and could not find any suitable article in the web. thank you!
Upvotes: 1
Views: 744