|
|
The TRIM function
trim-character is a character or binary string expression of length 1.
source-string is a character or binary string expression.
source-string and trim-character must be of equal type, i.e. either must both be character or both binary.
Note: LEADING, TRAILING or BOTH is referred to as the trim-specification below.
Rules:
- If the data type of source-string is variable-length character, then the result of the TRIM function is a variable-length character with maximum string length equal to the maximum length of source-string.
- If the data type of source-string is fixed-length character, then the result of the TRIM function is a variable-length character with maximum string length equal to the length of source-string.
- If the data type of source-string is variable-length binary, then the result of the TRIM function is a variable-length binary with maximum string length equal to the maximum length of source-string.
- If the data type of source-string is fixed-length binary, then the result of the TRIM function is a variable-length binary with maximum string length equal to the length of source-string.
- If trim-specification is not specified, BOTH is implicit.
- If trim-character is not specified, ' ' (space) is implicit.
- If the length of trim-character is not 1, an error is returned.
- If the value of either operand is NULL, then the result of the function is NULL.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|