• Wouldn't a recursive CTE do this better?

    Random Technical Stuff[/url]