Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Functions

Syntax

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

$RPAD

The $RPAD function adds pad characters to the right of a character string up to the specified total length.

The return data type is C STRING of length specified in the n parameter.

 

Syntax

$RPAD(string, n [,pad])

string
Required. The string to be "padded". If the length of the string is longer than n, the portion of the string that fits into n is returned.

n
Required. n is the total length of the return value ( 0 < n <= 255)

pad
Optional. pad evaluates to a single character. The default is the space character.

 

Example

SELECT $LPAD(COMPANY, 45, '*'), $RPAD(COMPANY, 45, '*') FROM CUSTOMERS WHERE COMPANY='SYSTEMS'

*****Dynamic Information Systems Corporation
Dynamic Information Systems Corporation *****

Top