Advantage Concepts
Advantage Expression Engine function that removes trailing spaces from a character string
TRIM(<cString>) à cTrimString
<cString> |
The character string to be copied without trailing spaces. |
TRIM() returns a copy of <cString> with the trailing spaces removed. If <cString> is a null string ("") or all spaces, TRIM() returns a null string ("").
TRIM() is a character function that formats character strings. It is used to delete trailing spaces while concatenating strings. This is typically the case with database fields that are stored in fixed-width format. For example, you can use TRIM() to concatenate first and last name fields to form a name string.
TRIM() is identical to RTRIM(). TRIM() is also related to LTRIM(), which removes both leading and trailing spaces. The inverse of ALLTRIM(), LTRIM(), and RTRIM() are the PADC(), PADR(), and PADL() functions which center, right-justify, or left-justify character strings by padding them with fill characters.
Note Do not use TRIM, RTRIM, ALLTRIM, or LTRIM to create a variable length index key. If you use a TRIM function, also use a PAD function to make the key length a fixed length. For example: PADR(TRIM(charfield),10).
Note The TRIM() function treats carriage returns, line feeds, and tabs as space characters and removes these as well.
Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.
Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.