I had a good solution, but I won't post anything without seeing some real effort.
The problem seems to be coming from these 2 threads:
http://www.sqlservercentral.com/Forums/Topic1808920-3077-1.aspx
http://www.sqlservercentral.com/Forums/Topic1809713-3077-1.aspx
Once I see real effort and understanding of basic concepts, I'll post something.