Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## RIGHT

> Returns the rightmost count of characters of `string_exp`.

> #### Syntax

>     RIGHT ( string_exp , count )

> 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

> #### 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.

> ##### Compatibility

> ODBC compatible

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095