• Actually for readability, this one's even better,

    It has only 32 "words" compared to your 70,

    182 non-space characters to your 363,

    and runs just as fast:

    select

    u.UserID

    , stuff((

    select ', ' + u2.RoleName

    from @UserRole u2

    where u2.UserID = u.UserID

    group by u2.RoleName

    order by min(u2.RoleAssignedDate)

    for xml path('')

    ),1,2,'') 'RoleName'

    from @UserRole u

    group by u.UserID