TRIM

4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next

version 11


TRIM ([[LEADING |TRAILING |BOTH] [arithmetic_expression] FROM] arithmetic_expression)

Description

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;

See Also

LTRIM, RTRIM.


4D - Documentation   Français   English   German   Japanese   4D SQL Reference, Table of Contents   4D SQL Reference, Index   Back   Previous   Next