Re: Heirarchical Data Structures. MS Access. Together?
Date: 28 Jul 2003 09:54:14 -0700
>> one should not allow removal of a parent (i.e. someone that has
children)... any parent has (right - left - 1) / 2 = number of children. <<
I usually use (lft = rgt -1) to detect leaf nodes. If there is an index on (lft, rgt) or just (lft), the speed is pretty good.
DELETE FROM Tree
WHERE lft = rgt -1
AND <<other conditions>>; Received on Mon Jul 28 2003 - 18:54:14 CEST