You are here:
RPAD
Inserts characters that you specify to the right-side of a text string.
Use
RPAD(text, padded_length[,
'pad_string']) and replace the variables:
- text is the field or expression after which you want to insert characters.
- pad_length is the number of total characters in the text string that is returned.
- pad_string is the character or characters to insert. pad_string is optional and defaults to a blank space.
If the value in text is longer than pad_string, text is truncated to the size of padded_length.
Tips
Ending blank spaces are omitted.
RPAD(Name, 20) truncates the Name
field after 20 characters. For example, if the name is mycompany.com, the value returned is “mycompany.com.”
RPAD('my_company.com', 14, 'z') returns
“my_company.com” without change because it has 14 characters.
RPAD(Name, 15, 'z') returns
“mycompany.comz” .
RPAD(Name, 2) truncates the name after the second
character. For example, if the name is mycompany.com, the
value returned is “my.”

