• We will be much more willing to help you if you script create table statements and inserts for us that set the data up the way you show it. That way we can just write a statement show you how to do what you desire.

    Also, putting the full strings in for stuff such as status codes is VERY inefficient from a storage and processing perspective!!

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service