• Lynn,

    Thank you very much for the code, and also for correcting what I had sent. This works fine except for one thing; I get this message when I run it:

    Msg 536, Level 16, State 3, Line 1

    Invalid length parameter passed to the substring function.

    When I take out the '- 1' it works fine, but obviously gives me more everything.