Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Tree Path

Author  Topic 

william
Starting Member

8 Posts

Posted - 2001-04-19 : 19:00:50
I have a tree table that basically looks like this:

ItemID
Name
Value
ParentID
L
R

What I want to do is write an efficient stored procedure that I can call as follows:

spGetValue 'Root\Bloggs\FirstName'

And the SP will return the value of that specific item (ie what I am passing the SP is a path through the tree). I'd like to avoid using temp tables as this could be potentially a very large application.

Does anyone have any suggestions?

   

- Advertisement -