RJUST: Right-Justifying a Character String

How to:

The RJUST function right-justifies a character string. All trailing blacks become leading blanks. This is useful when you display alphanumeric fields containing numbers.


Top of page

x
Syntax: How to Right-Justify a Character String
RJUST(length, source_string, output)

where:

length
Integer

Is the number of characters in source_string and output Their lengths must be the same to avoid justification problems.

source_string

Alphanumeric

Is the character string to right justify.

output

Alphanumeric



Example: Right-Justifying a String

RJUST right-justifies LAST_NAME and stores the result in a column with the format A15:

RJUST(15, LAST_NAME, 'A15')

iWay Software