• This will work as well:

    with SampleData as (

    select

    StrVal

    from

    (values ('abc ,'),('cde,xyz,aaa,'),('zzz, yyy ,ttt,'),('qwe'),('asd,fgh'))dt(StrVal)

    )

    select

    StrVal,

    left(StrVal,len(StrVal) - patindex(',%',reverse(StrVal)))

    from

    SampleData;