Entering content frame

TRIM(x,y) 

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.

TRIM(x,y) also removes the blanks (code attribute ASCII, UNICODE) or binary zeros (code attribute BYTE) from the end of the character string and then all of the 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.

 

Result of the TRIM(x,y) function

TRIM(x)

Only blanks (code attribute ASCII, UNICODE) or binary zeros (code attribute BYTE) are removed from x.

x is a NULL value

NULL value

Example table: customer

SELECT name, TRIM(CHR(account)) & ' EURO' account
FROM customer WHERE account > 0.00

NAME

ACCOUNT

Porter

100.00 EURO

DATASOFT

4813.50 EURO

Peters

650.00 EURO

TOOLware

3770.50 EURO

Brown

440.00 EURO

See also:

LTRIM(x,y)

RTRIM(x,y)

 

Leaving content frame