Home Forums Programming General Hierarchy without cursor/loop RE: Hierarchy without cursor/loop

  • ansaryarshad - Wednesday, March 22, 2017 3:52 AM

    Hi Thom,
    Sorry for the reply.
    I am coming from an SAP HANA background where CTEs are still evolving . We dont have the option of doing recursive CTE or rCTES (Frankly I was not aware that there existed something like rCTEs).
    I tried to breakup  your rCTE and did individual select statements.Obviously that did not work ..

    BR
    Arshad

    Are you working in SQL Server for this problem or not?

    --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)