What is use of trim

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rohit Yogi

    What is use of trim

    I have few scripts which use rtrim, ltrim & trim.

    I want to know what is use of these functions what do the do.

    1 example of SQL is:

    update ARRANGEMENT set DOCUMENT=trim(D OCUMENT);
    commit;
  • Don Million

    #2
    Re: What is use of trim

    It's pretty simple: rtrim trims blanks from the right side of a
    string, ltrim trims blanks from the left side, and trim trims blanks
    from both sides.

    Comment

    • The Elemenatlist

      #3
      Re: What is use of trim

      rohityogi@yahoo .com (Rohit Yogi) wrote in message news:<ed793cc1. 0404300242.1987 abcd@posting.go ogle.com>...
      I have few scripts which use rtrim, ltrim & trim.
      >
      I want to know what is use of these functions what do the do.
      >
      1 example of SQL is:
      >
      update ARRANGEMENT set DOCUMENT=trim(D OCUMENT);
      commit;
      To "trim" off any leading (ltrim) or trailing (rtrim) spaces.

      So that if, in your example above,
      If DOCUMENT = ' hello world '
      The result, after the trim would be:
      DOCUMENT = 'hello world'

      Comment

      Working...