When I analyzed the data from an Access database before import into our SQL database, I saw some strings with extra spaces at the end. So I thought I could simply use the RTRIM() function, I quickly put together a script and ran -> NOTHING WORKED

Tried couple times, the result still the same. It turns out there is a note in SQL Online Book

LTRIM does not remove white-space characters such as the tab or line feed characters…

And the spaces in the data are LFs (char(10)). The solution is to replace those char(10) with a space (char(32)) before calling RTRIM()