469,644 Members | 1,699 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

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(DOCUMENT);
commit;
Jul 19 '05 #1
2 6325
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.
Jul 19 '05 #2
ro*******@yahoo.com (Rohit Yogi) wrote in message news:<ed**************************@posting.google. 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(DOCUMENT);
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'
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by lkrubner | last post: by
22 posts views Thread by Simon | last post: by
12 posts views Thread by Robert Mark Bram | last post: by
22 posts views Thread by Terry Olsen | last post: by
31 posts views Thread by rkk | last post: by
4 posts views Thread by =?Utf-8?B?Ym9va2VyQG1ndA==?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.