4D v14

TRIM

Home

 
4D v14
TRIM

TRIM  


 

 

 Command TRIMTRIM ([[LEADING |TRAILING |BOTH] [arithmetic_expression] FROM] arithmetic_expression)

The TRIM function removes empty spaces, or specified characters when they are passed in first optional arithmetic_expression, from the extremities of the arithmetic_expression passed.

You can pass LEADING to indicate that the spaces/characters should be removed from the beginning of the arithmetic_expression, TRAILING to indicate that they should be removed from the end of it, or BOTH. If none of these keywords are passed, it is the equivalent of passing BOTH (the spaces or characters will be removed from both the beginning and end of the arithmetic_expression).

The optional first arithmetic_expression passed indicates the specific individual characters to be removed from the second arithmetic_expression. If it is omitted, only empty spaces will be removed.

Example  

This example removes any empty spaces from the product names:

SELECT TRIM(Name)
FROM PRODUCTS;

 
PROPERTIES 

Product: 4D
Theme: Functions

 
SEE ALSO 

LTRIM
RTRIM

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)