RGB  RightTrim

Chapter 2: DataWindow Expression Functions

Right

Description

Obtains a specified number of characters from the end of a string.

Syntax

Right ( string, n )

Argument

Description

string

The string from which you want characters returned

n

A long whose value is the number of characters you want returned from the right end of string

Returns

String. Returns the rightmost n characters in string if it succeeds and the empty string ("") if an error occurs.

If n is greater than or equal to the length of the string, Right returns the entire string. It does not add spaces to make the return value’s length equal to n.

Examples

Example 1

This expression returns RUTH:

Right("BABE RUTH", 4)

Example 2

This expression returns BABE RUTH:

Right("BABE RUTH", 75)

See also





Copyright © 2004. Sybase Inc. All rights reserved. RightTrim

View this book as PDF