Saturday, February 25, 2012

rtrim and ltrim?

I have some data that contains spaces both before and after the text string, and now I'm wondering what would be the best method to remove these blanks (sometimes there are no blanks, so I can't check with a specifik width)?

Is it possible to do something like:

set foo = ltrim(rtrim(foo))

or do I have to split it into 2 steps?

This trimming will be done in update & insert statements

// Patiltrim(rtrim(...)) is fine, you can use this in one step in either select, insert and/or update.|||Thanks for the quick reply! :)

No comments:

Post a Comment