July 2012
Intermediate to advanced
816 pages
27h 38m
English
With a hierarchical table populated and indexed, you’re ready to start writing efficient queries against it using some more methods available on the hierarchyid type.
The IsDescendantOf method is invoked on one hierarchyid value and accepts another hierarchyid value as its parameter. It returns a bit (Boolean) value of 1 (true) if the hierarchyid that the method is invoked on is a descendant (either directly or indirectly) of the hierarchyid that is passed in as the parameter. Thus, this method essentially returns a subtree whose root is the node specified by the parameter. Because of its vertical traversal, it delivers very fast performance for tables that have a depth-first index.
You can easily ...
Read now
Unlock full access