Topic group Related topics
Returns characters from the end of a character string.
The string from which you want to extract characters.
The number of characters to extract from the string.
Starting with the last character of a character expression, RIGHT( ) returns a specified number of characters. If the number of characters you specify for <expN> is greater than the number of characters in the specified string or memo field, RIGHT( ) returns the string as is, without adding spaces to achieve the specified length. If <expN> is less than or equal to zero, RIGHT( ) returns an empty string.
Strings often have trailing blanks. You may want to remove them with TRIM( ) before using RIGHT( ).
When RIGHT( ) returns characters from a memo field, it counts two characters for each carriage-return and linefeed combination (CR/LF).
Other than the syntactic difference of being a method instead of a function, the right( ) method behaves identically to the RIGHT( ) function.