| how to loop and duplicate a string [message #631077] |
Thu, 08 January 2015 19:58  |
 |
kmmchan
Messages: 1 Registered: January 2015
|
Junior Member |
|
|
hi experts
I have this string which I need to query from a table
select config_val from from config_tab where config_string = 'COLUMN_OUT'
CONFIG_VAL
----------
A_$,B_$,C_$,D_$
I need to loop through this string dynamically and replace the '$' with the actual looping value
e.g. If the loop=2, then the value should be A_1,B_1,C_1,D_1,A_2,B_2,C_2,D_2
if the loop=3, then the value should be A_1,B_1,C_1,D_1,A_2,B_2,C_2,D_2,A_3,B_3,C_3,D_3
and etc...
Any idea I can do this?
|
|
|
|
|
|
|
|