ALLTRIM( ) function

Returns a new string containing a copy of the specified string with leading and trailing spaces removed.

Syntax

ALLTRIM(string)

Parameters

string

Character. The value to remove leading and trailing spaces from.

Output

Character.

Remarks

This function removes the leading and trailing spaces from a string. Spaces inside the string are not removed. You can use this function when you are concatenating character values, such as first name and last name fields, and you want to eliminate blanks so that the resulting field does not contain large blank spaces between the names.

Use the LTRIM( ) function if you only want to remove leading spaces from a string, or the TRIM( ) function if you only want to remove trailing spaces.

Examples

Example Return value

ALLTRIM("   Vancouver   ")

“Vancouver”

ALLTRIM("   New York   ")

“New York”

Related reference
LTRIM( ) function
TRIM( ) function


(C) 2015 ACL Services Ltd. All Rights Reserved.