I have a table that contains a lot of usernames. Some of the usernames is stored with a trailing space, and I need to remove this. It means that "johndoe[space]" should be "johndoe".
This SQL returns all records that has usernames ending with space:
SELECT TOP (1000) UserName FROM tblUserVisit WHERE (UserName LIKE '% ')
How can this SQL be modified to remove the trailing space from the usernames?