Extract parent node from CELKO nested set model

From: Simon Clifton <simonclifton_at_planet9.co.uk>
Date: 17 Jul 2002 09:57:45 -0700
Message-ID: <ac5e4ae2.0207170857.57ed1bfd_at_posting.google.com>



I am using the nested set model (Joe Celko) to represent a binary tree and a procedure similar to the following to extract subordinate nodes.

 SELECT P2.*
   FROM Personnel AS P1, Personnel AS P2   WHERE P1.lft BETWEEN P2.lft AND P2.rgt     AND P2.emp = :myemployee;

I would like to edit this to include each nodes parent node - any ideas ?
Thanks. Received on Wed Jul 17 2002 - 18:57:45 CEST

Original text of this message