4 Replies Latest reply on Feb 25, 2013 11:05 AM by Irha10

    apex process inserting multiple row


      i have a process on my page which inserting some tables. one table may have more than one row. say

      id1, id2, attr1, desc
      1 1001, 1, abc
      2, 1001, 4, xyz
      3, 1001, 5, hhh

      so on. id2 is a fk key in this table. for same id2 it may have more than one row.

      i have process and following is part of it but getting error that is PLS-00224: object 'P30_QUES' must be of type function or array to be used this way .

      v_count number;
      v_code number;


      select count(*) into vv_count from table1; -- it may have 7 or 8 questions

      FOR i IN 1 .. v_count LOOP

      select code into v_code from table1 where code = :p30_ques(i);

      if :p30_ques(i) is not null then
      INSERT INTO table2 (id1, id2, attr1, desc)
      values (null,fk_value, v_code,nvl(:p30_ques(i),null));
      end if;
      end loop;

      i appriciate your help!