I took a look at the link you posted. It's good code and it definitely solves your problem. Not sure why I missed the basis of your original request, but here's how the solution that you used works. 🙂
http://www.sqlservercentral.com/articles/T-SQL/71550/
--Jeff Moden
Change is inevitable... Change for the better is not.