• This CTE method is not fool proof: it doesn't work if the separator character is not in the main string:

    Msg 536, Level 16, State 5, Line 3

    Invalid length parameter passed to the SUBSTRING function.

    Wilfred
    The best things in life are the simple things