• A very nice article.

    I ran into a similar problem a little over a year ago and posted my solution at the time to the site. It is at: http://www.sqlservercentral.com/scripts/Print/63240/

    It is always interesting to see how different people solve similar problems. I also found some of the XML-based solutions mentioned in the comments very interesting.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/