• Read this and post some DDL/DML and we can likely help. As noted, however, the design probably needs work. If you can't change that, give us some setup and we'll help

    http://www.sqlservercentral.com/articles/Best+Practices/61537/