开发者

Traversing a Parent / Child Table?

I have a Self-join开发者_如何学JAVA(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!


Check out recursive Common Table Expressions

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜