Returns the rightmost characters of a string.
RIGHT ( string-expression, numeric-expression )
string-expression The string to be left-truncated.
numeric-expression The number of characters at the end of the string to return.
The following statement returns the value “olate:”
SELECT RIGHT( 'chocolate', 5 ) FROM iq_dummy
If the string contains multibyte characters, and the proper collation is being used, the number of bytes returned might be greater than the specified number of characters.
The
result datatype of a RIGHT function is a LONG
VARCHAR. If you use RIGHT in a SELECT
INTO statement, you must have a Large Objects Management
option license or use CAST and set RIGHT to
the correct data type and size.
See “REPLACE function [String]” for more information.
Chapter 11, “International Languages and Character Sets” in the Sybase IQ System Administration Guide