By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,197 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,197 IT Pros & Developers. It's quick & easy.

What is use of trim

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.