Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Community interest groups have now moved from Yammer to Microsoft Viva Engage. To join a Viva Engage community and take part in the latest discussions, fill out the Request access to Finance and Operations Viva Engage Community form and choose the community you want to join.
The TRIM function returns the specified text string as a String value after tab, carriage return, line feed, and form feed characters have been replaced by a single space character, after leading and trailing spaces have been truncated, and after multiple spaces between words have been removed.
Syntax
TRIM (text)
Arguments
text: String
The valid path of a data source of the String type.
Return values
String
The resulting text value.
Usage notes
In some cases, you might want to truncate leading and trailing spaces but prefer to keep formatting for the specified text. For example, when this text represents an address that could be entered in the multi-line text box and could contain line feed and carriage return formatting. In this case, use the following expression: REPLACE(text,"^[ \t]+|[ \t]+$","", true) where text is the argument that refers to the specified text string.
Example 1
TRIM (" Sample text ") returns "Sample text".
Example 2
TRIM (CONCATENATE (CHAR(10), " Sample ", CHAR(9)," text ", CHAR(13))) returns "Sample text".