RJUST: Right-justifying a Character String

How to:

The RJUST function right-justifies a character string. All trailing blanks 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_format)

where:

length

Integer

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

source_string

Alphanumeric

Is the string to right justify.

output_format

Alphanumeric



Example: Right-justifying a Column

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

RJUST(15, LAST_NAME, 'A15')

iWay Software