Function documentationTRIM(x,y) Locate this document in the navigation structure

 

TRIM(x,y) is a string function that removes all of the characters specified in the character string y from the start of the character string x. The result of TRIM(x,y), therefore, starts with the first character that was not specified in y.

Additionally, TRIM(x,y) removes the spaces from the end of the character string x (code attribute ASCII, UNICODE) and then all characters specified in the character string y. The result of TRIM(x,y), therefore, ends with the last character that was not specified in y.

TRIM(x,y)

x, y

Result of the TRIM(x,y) Function

TRIM(x)

Spaces only (code attribute ASCII, UNICODE) are removed from x.

x is a NULL value

NULL value

Example

SQL Tutorial, Changing Character Strings

More Information

LTRIM(x,y)

RTRIM(x,y)