bulk collect problem
StarJun 21 2011 — edited Jun 21 2011I have following annymous block.
Table imei_temp contains the 9 records with processed_flag = 'N';
If I execute following block with limit 10 I am not getting any result.
However, If I change value 10 to 3 I am getting all 9 records present in the imei_temp table
can anyone help to me so that I should get all the 9 rows even limit is 10
DECLARE
CURSOR c_load_imei_temp
IS
SELECT imei
FROM imei_temp
WHERE processed_flag = 'N';
TYPE load_imei_table IS TABLE OF c_load_imei_temp%ROWTYPE;
rloadtemp load_imei_table;
BEGIN
msgs('START');
OPEN c_load_imei_temp;
LOOP
FETCH c_load_imei_temp BULK COLLECT INTO rloadtemp LIMIT 10;
EXIT WHEN c_load_imei_temp%NOTFOUND;
FOR lv_index IN 1..rloadtemp.count
LOOP
msgs(rloadtemp(lv_index).imie);
END LOOP;
END LOOP;
EXCEPTION
WHEN OTHERS
THEN
MSGS(SQLERRM);
END;