Hi dear''s

  • It is little urgent if any body how came frame to a query for the following tree so that I can get this result for th following tree

    Structure Like this

    ACCID           ACCName             Parent                 IsRoot            Value

    1                  AAA                      0                        1                  0

    2                  BBB                       0                        1                  0

    3                 CCC                        1                        0                  5

    4                 ddd                         3                        0                  8

    5                 eee                         4                         0                 4

     

     Against this ACCID's I will be having some Counts here I need to know at the root level  0

    ex., at the root level need to get the result  as

    Accid   Value

    1          17

    2            0

  • Try searching the web for "Nested Sets".  That method will make managing tree data much easier.  The alternative (and the way you have it now) is "Adjacency List".

    There are several examples that can be altered to get the results you desire.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply