• Thanks for this, I did consider this as an option, but found that it wasnt that performant overall due to the structure of the source tables that I was reading from and the nature of the data.

    Also (from memory) this doesnt build a ragged hierarchy which is a strict requirement for this project.

    However I'm working on a alternative using one of Jeffs recent articles on Hierarchies http://www.sqlservercentral.com/articles/Hierarchy/94040/), but its slow going as i can only do that when I dont have anything else more urgent to do, once I've got the code I'll post it back here.

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices