In C#, we have String.LastIndexOf
method to get a last index of a particular character location for given string. Is there any similar function to do same in SQL Server? I tried using CHARINDEX
but couldn't achieve it.
A little tricky, but you could do something like:
REVERSE(SUBSTRING(REVERSE([field]),0,CHARINDEX('[char]',REVERSE([field]))))