REVERSE: Reversing a Character String

How to:

The REVERSE function reverses the characters in a character string.


Top of page

x
Syntax: How to Reverse a Character String
REVERSE(length, source_string, output_format) 

where:

length

Integer

Is the number of characters in the source_string and output_format.

source_string

Alphanumeric

Is the string to reverse characters.

output_format

Alphanumeric



Example: Reversing the Characters in a String

REVERSE reverses the characters in PRODCAT and stores the result in a column with the format A15:

REVERSE(15, PRODCAT, 'A15')

For VCRs, the result is sRCV.

For DVD, the result is DVD.


iWay Software