Compartir a través de


RIGHT( ) Function

Returns the specified number of rightmost characters from a character string.

RIGHT(cExpression, nCharacters)

Return Values

Character

Parameters

  • cExpression
    Specifies the character expression whose rightmost characters are returned.
  • nCharacters
    Specifies the number of characters returned from the character expression. RIGHT( ) returns the entire character expression if nCharacters is greater than the length of cExpression. RIGHT( ) returns an empty string if nCharacters is negative or 0.

Remarks

Characters are returned beginning with the last character on the right and continuing for a specified number of characters.

Example

CLEAR
? RIGHT('Redmond, WA', 2)  && Displays WA

See Also

AT( ) | AT_C( ) | ATC( ) | ATCC( ) | ATCLINE( ) | ATLINE( ) | LEFT( ) | LEFTC( ) Function | LTRIM( ) | RAT( ) | RATLINE( ) | RTRIM( ) | SUBSTR( ) | RIGHTC( ) | SUBSTRC( ) | TRIM( )