Sorting nested set by name while keep depth integrity
- by wb
I'm using the nested set model that'll later be used to build a sitemap for my web site. This is my table structure.
create table departments (
id int identity(0, 1) primary key
, lft int
, rgt int
, name nvarchar(60)
);
insert into departments (lft, rgt, name) values (1, 10, 'departments');
insert into departments (lft, rgt,…