Because you know the address is at the end of the string, you can use a trick to replace it via stuff()
. That is, just replace the characters in those positions with the empty string.
I find the easiest way to do this is by reversing the string, replacing the first +1 characters, and reversing again. In this case, is the length of the dirty city name and the "+ 1" is for the space:
select reverse(stuff(reverse(Address), 1, len(cl.Dirty_City_Name) + 1, '')), cl.Standard_City_Name
from Student s left join
Cities_lookup cl
on s.Address like '% '+cl.Dirty_City_Name