I use it mostly to parse out the file names from a long file path. Example:
DECLARE @FilePath VARCHAR(100)
SET @FilePath = 'C:\Users\abcd\AppData\Local\Temp\Temp.txt'
SELECT REVERSE(LEFT ( REVERSE(@FilePath) , CHARINDEX('\',REVERSE(@FilePath))))
Instead of finding the last backslash throu string splitters, i used combination of functions along with REVERSE to do the task..
Generalisation - sometimes you'll find that a certain character in a string is repeated several times, and you want to extract the chunk of the string between the last occurrence of this character and the end of the string.
Without REVERSE(), this would be quite involved. ColdCoffee's solution shows how easy it is with REVERSE().
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.