In T-SQL, how do I replace the occurrence of a substring only at the end of a character string (varchar)?
For example:
If I were to do the operation with substring violence on character string 'violence begets violence', the result would be 'violence begets '
Some other examples are
1)'the fox jumped over the fence' with substring fox would result in no change as fox is not at the end of the character string.
2)Can I kick the can with substring can would result in Can I kick the
3)gs_fs_pringles with substring _fs would result in no changes
4)gs_pringles_fs with substring _fs would result in gs_pringles
gs_pringles_fsbecomegs_pringles?gsis notfs?