Reference Guide > TDV Support for SQL Functions > TDV-Supported Character Functions > RTRIM
 
RTRIM
The RTRIM function trims all white-spaces from the right side of a string.
Syntax
RTRIM (string) [ ]
Remarks
White-spaces embedded in an input string are not affected.
If the input string is NULL, the output is also NULL. Otherwise, the output is of the same type as the input.
The following table lists the input types that you can use in RTRIM, and their corresponding output types.
Data Type of string
Output Type
CHAR, LONGVARCHAR, NULL, VARCHAR
Same type as the input type. For example, if the input is of type CHAR, the output is also of type CHAR.
Example (No White-Space before Second Concatenated String)
concat (RTRIM ('AAA '), 'Member')
 
This example has white-spaces at the end of the sequence AAA and no white-space character preceding the M in Member. It produces the following result:
AAAMember
Example (White-Space before Second Concatenated String)
concat (RTRIM ('AAA '), ' Member')
 
This example has white-spaces at the end of the sequence AAA and one white-space character preceding the M in Member. It produces the following result:
AAA Member