The TRIM function removes all white spaces from the text and inserts a single space between the words. This involves removing all spaces at the beginning and end of the text and replacing blocks of two or more spaces between words with a single space.
Syntax
TRIM(
text
)
Parameters
- text: Text from which you want to remove the spaces or name of the column containing the texts from which to remove the spaces.
Returned value
The TRIM function returns a text string.
Examples
Below are different cases where unwanted whitespace is removed with the TRIM function:
Category
Text