Is there a straightforward way of finding the index of the last occurrence of a string using SQL? I am using SQL Server 2000 right now. I basically need the functionality that the .NET "System.String.LastIndexOf" method provides. A little googling revealed this - http://www.sqlservercentral.com/scripts/T-SQL+Aids/31116/ - but that does not work if you pass in a "text" column expression. Other solutions found elsewhere work only so long as the text you are searching for is 1 character long.
I will probably have to cook a function up. If I do so, I will post it here so you folks can look at it and maybe make use of.
Thanks!