Query on Hierarchy

  • IDParentiDIsAutoCalculateLevel

    1010

    2101

    3101

    4101

    5202

    6202

    7302

    8402

    9010

    10901

    11010

    121111

    131202

    The above table shows a parent child relationship with the hierarchy shown in column level.

    for each parent (IDs 1, 9, 11), I want the first child level where the column IsAutoCalculate = 0

    so for parent Id 1, the rows to be returned is of level 1 as that is the first child row of this parent with IsAutoCalculate = 0. The rows with level 2 should not be returned

    For parent id 3, the rows to be returned will be with level 2 as this is the first child row of this parent with IsAutoCalculate = 0

    Thanks in advance

    Warm Regards

    Sridhar

    Thanks & Regards

Viewing 0 posts

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