Hey and welcome to SSC!
I'd love to help, but I'm afraid that you haven't quite provided enough information. What I could do with from you is readily consumable sample data and DDL. If you check out this article (http://www.sqlservercentral.com/articles/Best+Practices/61537/)[/url], it explains how best to provide readily consumable sample data and DDL.
The actual issue that you're having is something that I suspect everyone comes up against at least once, so I'm certain that once you provide the requested information your issue will be solved reasonably quickly.
Thanks!