Reputation: 10163
I need to build a string in tsql which is a repetition of a given char for example if I have inputs
@in char,@len int
and in = 'x' ,len = 7 the result will be
in = 'x' ,len = 7
xxxxxxx
Upvotes: 0
Views: 29
Reputation: 21757
Try this:
select replicate(@in,@len)
Upvotes: 2