Teradata RPAD - Right Padding

Raymond Raymond visibility 1,088 event 2020-09-07 access_time 4 years ago language English

Teradata RPAD function is used to add repeated characters at the end of a string to increase the string to a specified length. It can be used to add trailing space or zeros to a string.

RPAD function signature 

RPAD(source_string, length, fill_string)

Returns the source_string padded to the right with the characters in fill_string so that the resulting string is length characters. 

Pad with trailing zeros

SELECT RPAD('123456789',23,'0');

Result:

'12345678900000000000000'

Omit fill_string parameter

The last parameter is optional. When it is omitted, the default value is space (' ')

Example:

SELECT RPAD('123456789',23);

Result:

'123456789              '
More from Kontext
info Last modified by Administrator 4 years ago copyright This page is subject to Site terms.
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts