Page 1 of 1

Using trim

Posted: Sat Dec 20, 2008 6:04 am
by rchintala
I have seen some one suing trim function in the following manner

trim [Expresion, " ", B] but trim function says character specifies a character other than a space or a tab. so please suggest if above usage of trim function trim [Expresion, " ", B] works.

It is all about using trim function is trimming leading and trailing spaces so i suggest that i want to trim[expression]

Please advise which is better option . Also i understand trim is basic function is it advisable to use in parrellel job? if and what should we use

Posted: Sat Dec 20, 2008 11:31 am
by kandyshandy
Trim is used everywhere.. server or px !!

Posted: Sat Dec 20, 2008 2:47 pm
by ray.wurlod
Square brackets indicate optional parts of the syntax. Trim() is a function, so the argument list is surrounded by parentheses, not square brackets.

The third argument to Trim() must be a literal string (that is, quoted) or the name of a variable. In your case

Code: Select all

Trim(Expression, " ", "B")

Thanks ray but my question i little different

Posted: Sat Dec 20, 2008 8:27 pm
by rchintala
ray.wurlod wrote:Square brackets indicate optional parts of the syntax. Trim() is a function, so the argument list is surrounded by parentheses, not square brackets.

The third argument to Trim() must be a literal ...
Can we use trim trim (Expresion, " ", B). since trim function says character specifies a character other than a space or a tab. but here some one using to trim space.

also I want to check if Trim () is just sufficiant to trim leading and trailing spaces

Posted: Sat Dec 20, 2008 11:44 pm
by laknar
try this
Trim(Expresion,'-','A')

Posted: Sun Dec 21, 2008 4:26 am
by ray.wurlod
Trim() with only one argument trims leading, trailing and redundant white space characters, exactly as described in the documentation.

Posted: Mon Dec 22, 2008 12:41 am
by vasa_dxx
If you want to Extract n char from a string, go for Left or Right Functions.
Left(string,Number).

Posted: Mon Dec 22, 2008 8:17 am
by chulett
Curious what this has to do with the topic at hand... or are you just delivering random nuggets as early Christmas presents?