On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Simple text functions
How to modify Strings
25. The REPLICATE() function



The last function in this section is REPLICATE(). It repeats a string (given in the first parameter) the number of times specified by the second parameter. Here is an example:

  REPLICATE(N'.',3) + Name
FROM Item;

This query returns the item name with three periods in front of it.


Let's try this out!


Slogans with multiple star and dot characters (e.g., SLOGAN *.*.*.*.*.) are fashionable this season. The marketing agency management has decided to change all slogans' texts to include a space and a string of five stars and five dots at the end. Show slogan texts with trailing space, stars and dots. Name the column FashionableText.

Stuck? Here's a hint!

Use Text + ' ' + REPLICATE('*.',5) expression.