First, here's the result set from my solution for this problem...
Results:
sId scode ParentID sName Hierarchy
--- ----- -------- ----- -------------------
1 11 0 a 11\111
2 111 1 b 11\111\1111
3 1111 2 c 11\111\1111\11111
4 11111 3 d 11111
(4 row(s) affected)
--Jeff Moden
Change is inevitable... Change for the better is not.