Removes leading and trailing blanks from a string.
Syntax
TRIM ( string-expression )
Parameters
Parameter
|
Description
|
string-expression
|
The string to be trimmed.
|
Returns
VARCHAR
NVARCHAR
LONG VARCHAR
LONG NVARCHAR
Note: The
result data type is a LONG
VARCHAR. If you use TRIM in a SELECT
INTO statement, you must have an Unstructured Data Analytics
Option license, or use CAST and set TRIM to
the correct data type and size.
Standards and Compatibility
Example
The following statement returns the value “chocolate” with no leading or trailing
blanks.
SELECT TRIM( ' chocolate ' ) FROM iq_dummy