By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,479 Members | 1,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,479 IT Pros & Developers. It's quick & easy.

UPDATE - Removing trailing spaces

P: n/a
I have three columns, RecordID, FirstName, and LastName, but somehow
through some program glitch, there is sometimes a trailing space in
the firstname and lastname columns, for example, a persons name could
be entered as "John " "Smith" or "Bob " "Johnson "

I know there is a RTRIM function in sql, but the problem I/m having is
making an update line go through each row, and removing trailing
spaces on those two columns. Any help will be greatly appreciated.
Thanks in advance.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Andy Visniewski" <an**@pepperell.net> wrote in message
news:f6**************************@posting.google.c om...
I have three columns, RecordID, FirstName, and LastName, but somehow
through some program glitch, there is sometimes a trailing space in
the firstname and lastname columns, for example, a persons name could
be entered as "John " "Smith" or "Bob " "Johnson "

I know there is a RTRIM function in sql, but the problem I/m having is
making an update line go through each row, and removing trailing
spaces on those two columns. Any help will be greatly appreciated.
Thanks in advance.


UPDATE T
SET FirstName = RTRIM(FirstName),
LastName = RTRIM(LastName)

Regards,
jag
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.