Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Table type parameters to procedures

555778Feb 22 2008 — edited Feb 22 2008
I am trying to pass a pl/sql table as a parameter to package procedure. I get "wrong number or types of arguments in call to" error .

This is waht I did in the trigger that calls this procedure :

CREATE OR REPLACE TRIGGER apps.t_pre_update
BEFORE UPDATE
ON t
FOR EACH ROW
declare
TYPE column_list IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER;

old_data column_list;
new_data column_list;

BEGIN

old_data(0) := :old.name;
old_data(1) := :old.ssn;

new_data(0) := :new.name;
new_data(1) := :new.ssn;


p1.create_history(old_data,new_data,:old.city);

end;

I created the package as follows :

create or replace package p1 as

TYPE column_list IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER;


procedure create_history(p_old_data IN column_list,
p_new_data IN column_list,
p_key IN varchar2) ;


The package and package body compile fine, i get an error when i try to compile the trigger .

Is something wrong here.


thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2008
Added on Feb 22 2008
2 comments
295 views