Function alltrim

Removes all leading and trailing spaces or parsing characters from the specified character expression, or all leading and trailing zero (0) bytes from the specified binary expression.

alltrim(VALUE [, FLAGS] [, PARSECHAR [, PARSECHAR2 [, ...]]])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringrequiredn/aVALUESpecifies an expression of Character or Varbinary type to remove leading and trailing spaces or 0 bytes from, respectively.
2integeroptional0FLAGSSpecifies if trimming is case-sensitive when one or more parse characters (PARSECHAR, PARSECHAR2 [, ...]] are included.
Trimming is case-sensitive if FLAGS is zero or is omitted. Trimming is case-insensitive if FLAGS 1. PARSECHAR [, PARSECHAR2 [, ...]]
3stringoptionalnonePARSECHAR(x)Specifies one or more character strings that are trimmed from the beginning and end of cExpression.
If PARSECHAR is not included, then leading and trailing spaces or 0 bytes are removed from Expression.
Note The maximum number of strings permitted in PARSECHAR is 23.

Remarks

You can use ALLTRIM() to ensure that spaces or 0 bytes are removed from data entered by a user.

Returns

Character or Varbinary. ALLTRIM() returns the specified expression without leading or trailing spaces, parsing characters, or 0 bytes respectively.


Example

The following example all spaces from a field

alltrim(PROPERTY.PROPDESC)