Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Location
    Helsinki, Finland
    Posts
    45

    Unanswered: 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

    // Pati

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    ltrim(rtrim(...)) is fine, you can use this in one step in either select, insert and/or update.

  3. #3
    Join Date
    Sep 2004
    Location
    Helsinki, Finland
    Posts
    45
    Thanks for the quick reply!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •