September 4, 2013 at 8:11 am
I have four tables containing the regular chars and varchars. Unfortunately, no one bothered to trim the values of white space before inserting them into the columns. Is there a way to ltrim(rtrim()) in place without resorting to temporary tables or variables?
I guess I could use a cursor but there has to be a better way.
Thanks!
John
September 4, 2013 at 8:25 am
it is actually pretty straightforward :
update table set varcharcol = ltrim(rtrim(varcharcol))
The probability of survival is inversely proportional to the angle of arrival.
September 4, 2013 at 9:09 am
That makes sense. Too bad I don't have any!
Thanks a million!
John
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy