Retrieving Hierarchy

Retrieving hierarchy is a common problem to solve database development. You can find this question in many modeling solutions, for example, Organograms, Product parts, etc. Depend on your approach it can be a hell to solve.
I will demonstrate two different forms to solve this problem, one using a Stored Procedure and other using function. There is not a better solution it will depend on your needs.

Continue reading “Retrieving Hierarchy”