The RPAD function
Use the RPAD function to return a copy of a string that has been right padded with a sequence of characters that are repeated as many times as necessary or truncated, depending on the specified length of the padded portion of the string. Specify the source string, the length of the string to be returned, and the character string to serve as padding.
The data type of the source string and the character string that serves as padding can be any data type that converts to VARCHAR or NVARCHAR.
In addition to these functions, the LTRIM and RTRIM functions can return a value that drops specified leading or trailing padding characters from their string argument, and the ASCII function can return the numeric value of the codepoint within the ASCII character set of the first character in its string argument. These built-in functions for operations on string values are described in theHCL OneDB™ Guide to SQL: Syntax.