title: Multiple FORALL in a orasql procedure
body: <p>Im trying to both delete then update some data from a table inside a procedure.  It is my understanding that both can't be done in the same FORALL statement and that I can do multiple FORALL using the same cursor.  The problem is that the second FORALL does not seem to do anything.  Is there something that im not getting?  Here is the code :</p>
  
  <pre><code>cursor cPARTY is
      SELECT /* +parallel(4) */ DISTINCT p.ID,
      CASE WHEN sf.PARTYID is null THEN 'delete'
      ELSE 'switch'
      END AS action,
      pa.SOURCESYSTEMLID as sources
      FROM CV_CLAIMS_TRAVEL.EPUR_PARTY p
      LEFT JOIN CV_CLAIMS_TRAVEL.STAR_FILE sf ON sf.PARTYID = p.ID
      LEFT JOIN CV_CLAIMS_TRAVEL.PARTY pa ON pa.ID = p.ID;
  
    type type_party is TABLE OF cPARTY%ROWTYPE INDEX BY PLS_INTEGER;
    t_party type_party;
  
    nLOT pls_integer := 1;
    nbDeleted int :=0;
    nbSwitched int := 0;
  
  begin
    p_tableName := 'PARTY(INDIVIDU)';
    allBEGIN_TIMESTAMP := systimestamp;
    open cPARTY;
  
      loop
      lotBEGIN_TIMESTAMP := systimestamp;
      dbms_application_info.set_module('CV_CLAIMS_TRAVEL.PARTY',trim(to_char(nLOT * nLIMIT,'999G999G999')));
  
      FETCH cPARTY BULK COLLECT
      INTO t_party
      limit nLIMIT;
  
      exit when t_party.count = 0;
  
      p_nbLinesTransfered :='Erreur: Suppression de donnÃƒÂ©es';
      dbms_application_info.set_module('CV_CLAIMS_TRAVEL.PARTY - DELETING',trim(to_char(nLOT * nLIMIT,'999G999G999')));
      FORALL i IN t_party.FIRST .. t_party.LAST
        DELETE /*+parallel(4)*/ FROM CV_CLAIMS_TRAVEL.PARTY 
      WHERE ID = t_party(i).ID
      AND t_party(i).action = 'delete';
  
      nbDeleted := nbDeleted + sql%rowcount;
  
    FORALL i IN t_party.FIRST .. t_party.LAST
      UPDATE CV_CLAIMS_TRAVEL.PARTY 
      SET UPDATEDATE = sysdate, SOURCESYSTEMLID = 'SOURCE_SYSTEM:0000000000', UPDATEDBYUSERID = 'CV_CLAIM_INTEG'
      WHERE ID = t_party(i).ID
      AND t_party(i).sources='SOURCE_SYSTEM:0000000004'
      AND t_party(i).action = 'switch'; 
      nbSwitched := nbSwitched + sql%rowcount;
      commit;
  
      lotEND_TIMESTAMP :=systimestamp;
      trc.trc_message('lotELAPSED '||to_char(nLOT * nLIMIT,'999G999G990')||' Rows. ELAPSED '|| replace(substr(to_char(lotEND_TIMESTAMP - lotBEGIN_TIMESTAMP, 'HH24:MI:SS.FF3'),1,20),'+000000 ','+'));
      nLOT := nLOT + 1;
    end loop;
    close cPARTY;
    commit;
    gather_stats('CV_CLAIMS_TRAVEL', 'PARTY');
  </code></pre>