title: Not able to compile PL/SQL with BULK COLLECT and FORALL
body: <p>I am getting below error while creating this procedure.</p>
  
  <pre><code>CREATE OR replace PROCEDURE Remove_sv_duplicate
  IS
    TYPE sv_bulk_collect
      IS TABLE OF tt%ROWTYPE;
    sv_rec SV_BULK_COLLECT;
    CURSOR cur_data IS
      SELECT *
      FROM   tt
      WHERE  ROWID IN (SELECT ROWID
                       FROM   (SELECT ROWID,
                                      Row_number () over (PARTITION BY portingtn,
                                      nnsp
                                      , onsp,
                                      spid,
                                      Trunc(
                                              createddate,
                                      'MI') ORDER BY portingtn) dup
                               FROM   tt)
                       WHERE  dup &gt; 1);
  BEGIN
    OPEN cur_data;
  
    LOOP
        FETCH cur_data BULK COLLECT INTO sv_rec LIMIT 1000;
  
        FORALL i IN 1..sv_rec.COUNT
          INSERT INTO soa_temp_sv_refkey_fordelete
                      (referencekey,
                       spid,
                       nnsp,
                       onsp,
                       portingtn)
          (SELECT referencekey,
                  spid,
                  nnsp,
                  onsp,
                  portingtn
           FROM   tt
           WHERE  portingtn = Sv_rec(i).portingtn
                  AND spid = Sv_rec(i).spid
                  AND nnsp = Sv_rec(i).nnsp
                  AND onsp = Sv_rec(i).onsp
                  AND svid IS NULL);
  
        EXIT WHEN cur_data%notfound;
    END LOOP;
  
    CLOSE cur_data;
  
    COMMIT;
  END; 
  </code></pre>
  
  <p>Procedure</p>
  
  <pre><code>Error(23,5): PL/SQL: SQL Statement ignored  
  Error(25,27): PLS-00382: expression is of wrong type  
  Error(25,27): PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records  
  Error(26,27): PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records  
  Error(26,27): PLS-00382: expression is of wrong type   
  Error(27,27): PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records        
  Error(27,27): PLS-00382: expression is of wrong type   
  Error(28,27): PL/SQL: ORA-22806: not an object or REF    
  Error(28,27): PLS-00382: expression is of wrong type  
  Error(28,27): PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records
  </code></pre>