Description
Returns a character expression without blank spaces (TRIM in Transact-SQL).
Sample Source Pattern
Syntax
TRIM( string_expression )
Arguments
string_expression:
String expressions to convert.
Return Type
VARCHAR
or NVARCHAR
Examples
Code:
SELECT TRIM(' FIRST AND LAST TWO BLANK SPACES ') AS [TRIM];
Output:
+-------------------------------+
|TRIM |
+-------------------------------+
|FIRST AND LAST TWO BLANK SPACES|
+-------------------------------+
Code:
SELECT TRIM(' FIRST AND LAST TWO BLANK SPACES ') AS TRIM;
Output:
+-------------------------------+
|TRIM |
+-------------------------------+
|FIRST AND LAST TWO BLANK SPACES|
+-------------------------------+
Last updated