SQL Server: Getting string before the last occurrence '>'
SELECT LEFT(assocname, LEN(assocname) - CHARINDEX('&gt;',REVERSE(assocname)))


So we're reversing it, finding the first '&gt;', then subtracting that from the length to find how far that character is from the beginning. Then take all characters up to that point.