GET_STRING_LIST takes a string list as input and returns an ordered table of different IDs in a variable :RES_TABLE. I would like to take every row (ID) in :RES_TABLE and call a procedure GET_VALUES for 2 different coefficients. The way the code is now, it only returns data for one ID but I need it to return data for every ID.
BEGIN
NUMBER1 = 0;
NUMBER2 = 0;
COUNTER = 0;
FOR
SELECT ID
from GET_STRING_LIST(:VAR_ID)
order by ID
INTO :RES_TABLE
DO BEGIN
SELECT COUNT(ID) FROM GET_STRING_LIST(:VAR_ID) INTO COUNTER;
WHILE (COUNTER > 0) DO BEGIN
select RES_VALUE
from GET_VALUES(:RES_TABLE, '%', 'SOME_STRING1', 7)
into :NUMBER1;
SELECT RES_VALUE
FROM GET_VALUES(:RES_TABLE, '%', 'SOME_STRING2', 7)
INTO :NUMBER2;
COUNTER = COUNTER -1;
END
END
-- SUSPEND;
END