A quick way to repeat characters...
jgrantMay 5 2006 — edited May 5 2006Hi,
What is the best way to repeat a certain character? For example, I am concatenating a number of values together into one string variable inside a stored proc. Something like this:
v_output_rec varchar2;
v_output_rec := '01' || 'text A' || 'text B' || 'text C';
this works just fine. However, there is a need when I want to concatenate say, 10 'zeros'. This would look like this:
v_output_rec := '01' || '0000000000'
So, my question: is there a way to use a function to repeat 10 '0' characters? I have tried using 'Rpad()' but I can't seem to get it to work just right. Does anyone know a way to do this?
Any info would be appreciated!