Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recursive calls
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Recursive calls
Miscellaneous
Thread ID:
00516517
Message ID:
00516517
Views:
47
I need to pull records from one table ( SQL 2000 on a Window 2000/NT platform ). One column is "Owner" another is "OwnerLink". The relation is that "OwnerLink" will contain the value that corresponds to that records parent found in "Owner".

Owner OwnerLink
ABC /* parent */
DEF ABC
GHI /* parent */
JKLMN GHI
OPQ JKLMN
ZZZ GHI
etc....

I want to pass the value of any "Owner" and get all the children.
This relationship is at least six layers deep, could be more. Does anyone have any experience or success with styling a recursive function/procedure that can return all the "Owners" and their children by passing one parameter and getting a one column result set of related "Owners" back with records from the same table.

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform