Neoview SQL Reference Manual (R2.3)
rpad('kite', 7)
• This function returns 'ki'.
rpad('kite', 2)
• This function returns 'kite0000'.
rpad('kite', 8, '0')
• This function returns 'go fly a kite'
rpad('go fly a kite', 13, 'z')
• This function returns 'go fly a kitez'
rpad('go fly a kite', 14, 'z')
• This function returns 'kitegoflygoflygof'
rpad('kite', 17, 'gofly' )
RTRIM Function
The RTRIM function removes trailing spaces from a character string.
RTRIM is a Neoview SQL extension.
RTRIM (character-expression)
character-expression
is an SQL character value expression and specifies the string from which to trim trailing
spaces. See “Character Value Expressions” (page 218).
Considerations for RTRIM
Result of RTRIM
The result is always of type VARCHAR, with maximum length equal to the fixed length or
maximum variable length of character-expression.
Example of RTRIM
Return ' Robert':
RTRIM (' Robert ')
See “TRIM Function” (page 429) and “LTRIM Function” (page 371).
RUNNINGAVG Function
The RUNNINGAVG function is a sequence function that returns the average of nonnull values
of a column up to and including the current row of an intermediate result table ordered by a
SEQUENCE BY clause in a SELECT statement. See “SEQUENCE BY Clause” (page 278).
RUNNINGAVG is a Neoview SQL extension.
RUNNINGAVG (column-expression)
column-expression
specifies a derived column determined by the evaluation of the column expression.
RUNNINGAVG returns the average of nonnull values of column-expression up to and
including the current row.
406 SQL Functions and Expressions