Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : RIGHT
 

RIGHT

Returns the rightmost count of characters of string_exp.

Syntax

RIGHT ( string_exp , count )

Notes

*The string_exp can be fixed‑length or variable‑length CHARACTER data types.
*The count can be INTEGER, SMALLINT, or TINYINT data types.
*If any of the arguments of the expression evaluate to NULL, the result is NULL.
*If count is negative, the result evaluates to NULL.
*string_exp and the result can contain multi‑byte characters. count represents the number of characters.

Example

This example illustrates the RIGHT function, selecting the rightmost six letters from the string ‘Afghanistan':
SELECT RIGHT(fld1,6) FROM test100 WHERE fld1 = 'Afghanistan';
RIGHT(FLD1,6)
---------------
nistan
1 record selected

Compatibility

ODBC compatible