Previous Topic

Next Topic

Inhoudsopgave

Book Index

Replicate

Replicate( char_expression, integer_expression )

Returns a string containing char_expression repeated integer_expression times.

Example

select Replicate( 'abc', 3 )

Differences

The only two differences are that ASE returns NULL and MS SQL Server returns the empty string when ‘integer_expression’ is 0, and that replicating the empty string n times in ASE gives a string containing n spaces, whereas in MS SQL Server, replication the empty string n times, yields an empty string. Obviously, the behavior of the empty string on ASE is caused by the implementation of the empty string as one space.