Viewing 4 posts - 1 through 4 (of 4 total)
Just exclude the where clause in the last query to extract the parent items as well:
select
*
from
Tree
--where
--TreeLevel > 1
order by
ConcatName asc
January 4, 2012 at 6:33 am
This looks like hierarchical or "tree structured" data.
The following query can be used to extract hierarchical or "tree structured" data.
/** setup data **/
declare @table table (ID int, PID int,...
January 4, 2012 at 6:00 am
My bad. 🙁
Sorry - I did not see the follow-up article links earlier . . . were a bit a sleep - just shows how good the article is...
January 7, 2011 at 2:56 am
Thanks Gail. Brilliant article. Can't wait for part 2 and 3.
January 7, 2011 at 2:00 am
Viewing 4 posts - 1 through 4 (of 4 total)