Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hierarchical SQL Select
Message
From
04/09/2009 10:15:12
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01422513
Message ID:
01422653
Views:
49
>>>The fk refers to the parent pk, right?
>>>
>>>If so, is pk 3 supposed to have a fk 2 rather than 1?
>>
>>
>>No, the adds and deletes point to the same parent. The edits (children) point to the add parent. the reasoning is if you have add rights you probably have edit rights also, but not necessarily delete rights.
>
>John,
>
>Check message #1422549 - I think it gives you the result you were looking for - it links all parents with their children.


It still gives me the original list. I posted an example output list in message #1422528. I've done this along time ago, but can't remember how I accomplished it. I think it involved a recursive function call..
Previous
Reply
Map
View

Click here to load this message in the networking platform