Home Forums SQL Server 2008 T-SQL (SS2K8) Hierarchy example - Ken Henderson's book - not working RE: Hierarchy example - Ken Henderson's book - not working

  • polkadot (2/25/2013)


    SQL_Enthusiast,

    I double and triple checked the book and the WHILE query in my original post is a facsimile.

    The where clause condition is slightly different, it excludes o1.supervisor<>o1.employee. The JOIN is on o1.employee=o2.supervisor. I'm not sure if that makes a difference....

    I didn't notice the post above before. Is the code you most recently posted an exact duplicate of Ken's code 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)