Parent to Child and subchilds

  • Hi All,

    I need an urgent help to build some logic in Oracle DB.

    I have a table called TREE and in that we have data based on hierarchies.

    We have columns like DataID and ParentID and DataID column is unique one.

    And the data for DataID and ParentID will be this is like parent and child relation ship.

    I need to get the count of all DataID's and Sub-dataID's of ParentID.

    I need to get the count of this without using Start With connect by option.

    Is there a way to get this done...

    Thanks

    Anilkumar B

  • anilkumar04_b (2/12/2013)


    Hi All,

    I need to get the count of this without using Start With connect by option.

    Why? Whats wrong with the CONNECT BY option?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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