Click here to Skip to main content
15,892,161 members
Articles / Database Development / SQL Server / SQL Server 2008

T- SQL - How to get all descendants of a given element in a hierarchical table

Rate me:
Please Sign up or sign in to vote.
4.46/5 (7 votes)
13 May 2009CPOL1 min read 49.5K   115   36  
This article provides a T-SQL table valued function that retrieves all the descendant rows of a given row in a hierarchical table.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Italy Italy
Paolo Costa is a software developer with long experience on any kind of .NET application. He lives in Italy and works in Switzerland for a credit card payment acquiring company.

Comments and Discussions