Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference RIGHT
Functions and Expressions Reference Guide
172
RIGHT
The RIGHT function returns a specified number of characters from a text
expression beginning with the rightmost byte of a text item.
Syntax
RIGHT (single-text-expression , single-integer-expression)
Meaning
RIGHT (text_to_extract_from ,
number_of_characters_to_extract)
Returns
This function returns a single-text-item.
RIGHT returns the rightmost number_of_characters_to_extract characters from
text_to_extract_from starting at the last (the rightmost) character in
text_to_extract_from.
If number_of_characters_to_extract evaluates to an integer whose value is less
than 1,
RIGHT evaluates to NONE. If number_of_characters_to_extract
evaluates to an integer whose value is greater than the size of
text_to_extract_from,
RIGHT evaluates to the entire value of
text_to_extract_from.
Examples
RIGHT ("Abcd" , 2) returns cd
RIGHT ("Abcd" , 6) returns Abcd
RIGHT ("000000" + NUMBERTOTEXT (TransactionNum), 6)
If TransactionNum contains 123, this example returns 000123. If
TransactionNum contains
123456789, this example returns 456789.