Link to home
Start Free TrialLog in
Avatar of joekeri
joekeriFlag for United States of America

asked on

How can i pass in a ROWTYPE to an procedure an populate it into an ARRAY?

I have a procedure called A_LOAD and I want to pass a record(%ROWTYPE) it an load the record type into an array.
Table_a  is defined as
Empno number
dept number
empname

I want to take all the records beign passed into the procedure and load it into the table. then I want to take the table a FETCH each column from it. I just dont know if i need a CURSOR or not.

ANy help will be appreciated.


Create or replace procedure A_LOAD
  (P_rec_in	 Table_A%rowtype) is
 
 TYPE C1_record_table is TABLE OF P_REC_IN%rowtype by binary_integer;
 C1_REC C1_record_table;
 
BEGIN

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of flow01
flow01
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joekeri

ASKER

What i wanted to to was to pass the entire table into the procedure and then Fetch/read each record and do a DBMS_OUPUT from it.

I undrstand your code, just wonder if i really need to use a package. Coulnt i blend your 3 procedures into a single procedure instead?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial