• Someone went WAY overboard on that split.

    If it'll always be just one comma, try something like this:

    declare @String varchar(100);

    select @String = 'first,last';

    select left(@String, charindex(',', @String)-1),

    right(@String, len(@String)-charindex(',', @String));

    Charindex finds the position of the comma in the string.

    Left pulls everything left of the indicated position, which is based on the Charindex of the comma.

    Right pulls everything to the right of the indicated position, which is the length of the string minus the position of the comma.

    (Both left and right pull a certain number of characters.)

    If you use column names instead of the variable, and a From clause with your table in it, it'll work on that instead.

    - 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