a loop over a select
676960Mar 18 2009 — edited Mar 24 2009hello,
i make a loop over a select , i give as input to the select a string with a list of number separated by "," (i call it projectIdList )
but in the loop, it iterates only over the first element
for example, if i give a string 1,2,3,4,5
just the iteration of 1 happen
here is the for head
for i in (select substr(the_string, decode(level, 1, 1, instr(the_string,',',1,level-1)+1), decode( instr(the_string,',',1,level), 0, length(the_string), instr(the_string,',',1,level) - decode( level, 1, 0, instr(the_string,',',1,level-1))-1) ) ProjectID from (select projectIdList the_string from dual ) connect by level < length(replace(translate(the_string,'01234567890','00000000000'),'0')) + 2) loop
any one has an ideai ?
Regards
Sallemel