SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-117
REPEAT Function
REPEAT Function
The REPEAT function returns a character string composed of the evaluation of a
character expression repeated a specified number of times.
REPEAT is an SQL/MX extension.
character-expr
specifies the source string from which to return the specified number of repeated
strings. The source string is an SQL character value expression. The operand is
the result of evaluating character-expr. See Character Value Expressions on
page 6-37.
count
specifies the number of times the source string character-expr is to be
repeated. The number count must be a value greater than or equal to zero of
exact numeric data type and with a scale of zero.
Examples of REPEAT
Return this quote from Act 5, Scene 3, of King Lear:
REPEAT ('Never,', 5)
Never,Never,Never,Never,Never,
REPEAT (character-expr, count)