TRIM
Description
TRIM
is a row function that removes leading and trailing spaces from a TEXT
value.Syntax
TRIM
(string_expression
)Return Value
Returns one value per row of type
TEXT
.Input Parameters
- string_expression
- Required. The name of a field or expression of typeTEXT(or a literal string).
Examples
Return the value of the
area_code
field without any leading or trailing spaces. Example:TRIM([area_code])
TRIM(" 650 ")
returns 650
. TRIM(" 650 123-4567 ")
returns 650 123-4567
. Note that the extra spaces in the middle of the string aren't removed, only the spaces at the beginning and end of the string.