• Can't help much without knowing what your tables look like (create scripts would be best).

    Assuming you have a table with the valid lookup values, you can query that.

    Might be a single Case statement, might be simpler as a Coalesce, but I can't tell which from what you've posted.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon