Previous Topic: RELATIONDN Function--Compare Two Distinguished Names

Next Topic: RPAD Function--Pad a String on the Right

RIGHT Function--Retrieve Characters from a String

The RIGHT function returns the specified number of characters from the end of a string. If the string is shorter than the number, the entire string is returned.

Syntax

The RIGHT function has the following format:

RIGHT(source_string, length)

Parameters

The RIGHT function accepts the following parameters:

source_string (string)

length (number)

Number of characters to extract, counting from the end of the string.

Return Value

The RIGHT function returns a string.

Example

Return_value=RIGHT('JuanJuan', 2)
Return_value='an'

Return_value=RIGHT('JuanJuan', 10)
Return_value='JuanJuan'

Return_value=RIGHT('JuanJuan', 0)
Return_value=''

More information:

LEFT Function--Return Part of a String

MID Function--Return Part of a String


Copyright © 2010 CA. All rights reserved. Email CA about this topic