23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REPEAT<br />

Note expression must be an INT (32-bit) data type.<br />

REPEAT<br />

Syntax<br />

118<br />

Compatibility<br />

ODBC compatible<br />

Returns a character string composed of string_exp repeated count times.<br />

Example The following example shows how to use the REPEAT function:<br />

Notes • The string_exp can be of the type fixed-length or variable-length CHARACTER.<br />

REPLACE<br />

Syntax<br />

SELECT RAND(3) 'Random number using 3 as seed value'<br />

FROM MYMATH;<br />

REPEAT ( string_exp , count )<br />

SELECT REPEAT(fld1,3) FROM test100WHERE fld1 = 'Afghanistan';<br />

REPEAT(FLD1,3)<br />

-----------------<br />

AfghanistanAfghanistanAfghanistan<br />

1 record selected<br />

• The count can be of type INTEGER, SMALLINT, or TINYINT.<br />

• If any of the arguments of the expression evaluates to a NULL, the result is NULL.<br />

• If the count is negative or zero, the result evaluates to NULL.<br />

• string_exp and the result can contain multi-byte characters.<br />

Compatibility<br />

ODBC compatible<br />

Replaces all occurrences of string_exp2 in string_exp1 with string_exp3.<br />

REPLACE ( string_exp1 , string_exp2 , string_exp3 )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!