Quote:
|
Originally Posted by sinwar
use bigint instead of smallint
|
i think i didn't explained very well my problem...
i have a table with 45 milion: i have to process contained data using an SP, with a declared cursors like this:
...
DECLARE CURSOR_FLUSSO CURSOR FOR
SELECT
RECCONTENT
FROM
NCH_RND_SMCC_FLUSS
FOR FETCH ONLY;
...
then, i have loop for fetching this cursor:
...
OPEN CURSOR_FLUSSO;
PARSE_LOOP:
LOOP
...
FETCH CURSOR_FLUSSO INTO CURR_RECORD;
IF SQLCODE <> 0 THEN
LEAVE PARSE_LOOP;
END IF;
...
...
...
END LOOP PARSE_LOOP;
...
1. Without any commit my FETCH INTO gives error after 32768 records processed.
2. With commit every 1000 or 10000 records, the cursor will be closed and if i re-open it i read the same data i have just commited.
I found something about DELETE WHERE CURRENT OF <CURSOR> on internet, but without any result on using it. This could help me on reopening cursor without having the old-already-processed data in it.