Link to home
Start Free TrialLog in
Avatar of webressurs
webressursFlag for Norway

asked on

Remove space from end of all records in a table

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 '% ')

Open in new window


How can this SQL be modified to remove the trailing space from the usernames?
ASKER CERTIFIED SOLUTION
Avatar of Haris Dulic
Haris Dulic
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial