Trying to BULK COLLECT into ROWTYPE type
Hello!
I am writing a stored procedure that will run on database A, reading 2 tables on database B and inserting into 2 tables on database C, all through DBLINKS. So, using PLSQL, we are trying BULK COLLECT. FORALL does not work with dblinks (413029.1), I've rewritten to use a "simple" FOR LOOP... but not I am facing a new problem:
(a) I sucessfully compile a proc with this:
TYPE web_contrato_tt IS TABLE OF BCSUL_T_WEB_CONTRATO@TOOLS%ROWTYPE;
web_contrato web_contrato_tt;
(...)
LOOP
FETCH C1 BULK COLLECT INTO web_contrato;
EXIT WHEN web_contrato.COUNT=0;
END LOOP;
FOR indx IN web_contrato.FIRST..web_contrato.LAST LOOP