Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

REMAINDER function [Numeric] Next Page

REPEAT function [String]


Concatenates a string a specified number of times.

Syntax

REPEAT( string-expression, integer-expression )

Parameters

string-expression    The string to be repeated.

integer-expression    The number of times the string is to be repeated. If integer-expression is negative, an empty string is returned.

Remarks

If the actual length of the result string exceeds the maximum for the return type, an error occurs. The result is truncated to the maximum string size allowed.

Alternatively, try using the REPLICATE function.

This function supports NCHAR inputs and/or outputs.

See also
Standards and compatibility
Example

The following statement returns the value repeatrepeatrepeat.

SELECT REPEAT( 'repeat', 3 );