Hansiehans - Friday, June 27, 2014 1:46 AM
I've had this pinned as a link since you posted it and have been seriously remiss in saying "Thank You". Great job (and hat's off to you for the embedded comments that make the code crystal clear) and thanks for sharing even years after the original questions was posted. It's proof positive that all the reminders about how old a post is really don't matter and is definitely worth asking a follow up question or posting an answer even on old posts. Well done and, even though you've not logged on for the previous two months, I hope you're still listening because I think this post has helped a whole lot of people that never took the time to say thanks for solving a fairly common and particularly itchy problem when you're the one that needs a solution.
Shifting gears a bit, this would would make great "SQL Spackle" article. You should write one and submit it. If you want, I'd even be willing to proof it and do a technical review for you.
--Jeff Moden
Change is inevitable... Change for the better is not.