Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Question - Passing Arrays

PL/SQL Question - Passing Arrays

From: <amerar_at_iwc.net>
Date: 11 Apr 2005 11:01:58 -0700
Message-ID: <1113239692.983611.110950@l41g2000cwc.googlegroups.com>

Hi All,

I have created a collection using the following code:

CREATE OR REPLACE PACKAGE TYPES AS TYPE batd_record IS RECORD -- Record for multiple inserts  (queue_name VARCHAR2(8),

  trns_code   CHAR(6),
  trns_data   CHAR(125),
  trns_seg    NUMBER,
  ref_id      VARCHAR2(8),
  user_id     VARCHAR2(16));

TYPE batd_tab IS TABLE OF BATD_RECORD index by binary_integer;

END;
/

Then, I want to pass it from a stored procedure to a function to be populated, and then return it to the stored procedure:

CREATE OR REPLACE FUNCTION mpc_ins_batd (p_batd IN TYPES.BATD_TAB) RETURN TYPES.BATD_TAB IS
.
.
.

   FOR i IN 1..p_batd.COUNT LOOP

      IF p_batd.trns_seg = 1 THEN
         v_seq_nbr := v_seq_nbr + 1;
      END IF;

.
.
.

When I try and compile I get the following error:

28/7     PL/SQL: Statement ignored
28/17    PLS-00302: component 'TRNS_SEG' must be declared
32/7     PL/SQL: SQL Statement ignored

What am I doing wrong? Any help would be appreciated.

Thanks,

Arthur Received on Mon Apr 11 2005 - 13:01:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US