Hi djpeanutUsing this as an example: http://en.wikipedia.org/wiki/Nested_set_model here's one way to select immediate children...declare @t table (Node varchar(20), Lft int, Rgt int)insert @t select 'Clothing', 1, 22union all select 'Men', 2, 9union all select 'Women', 10, 21union all select 'Suits', 3, 8union all select 'Slacks', 4, 5union all select 'Jackets', 6, 7union all select 'Dresses', 11, 16 --union all select 'Skirts', 17, 18 --union all select 'Blouses', 19, 20 --union all select 'Evening Gowns', 12, 13union all select 'Sun Dresses', 14, 15--immediate children of 'Women'; with t1 as (select b.* from @t a inner join @t b on a.Node = 'Women' and a.Lft < b.Lft and b.Lft < a.Rgt)select * from t1 a where not exists (select * from t1 where Lft < a.Lft and a.Lft < Rgt)--/
Ryan Randall - Yak of all tradesSolutions are easy. Understanding the problem, now, that's the hard part.