Please describe the problem you have along with DDL, some sample data and the expected results
Check the link in my signature if don't know how to do this
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/