Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00306 wrong number or types of argument in call to
PLS-00306 wrong number or types of argument in call to [message #9618] Mon, 24 November 2003 05:25 Go to next message
Tabrez
Messages: 4
Registered: April 2002
Junior Member
I,
I have written this simple SP to pass one value to the SP and return three values.

The procedure is as below:

create or replace procedure get_count_of_dnis1
(
dnis_in_out in out varchar,
scr_out out varchar,
no_cnt out varchar)

As
begin
select count(*) into no_cnt from routing where dnis1 like dnis_in_out or dnis2 like dnis_in_out;
select menu_script into scr_out from routing where dnis1 like dnis_in_out or dnis2 like dnis_in_out;
dbms_output.put_line(scr_out);
dbms_output.put_line(no_cnt);
end;
/
the procedure compiles OK but when I try to run the procedure like execute get_count_of_dnis1(0870321321);

I get the following error.

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GET_COUNT_OF_DNIS1'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

I am using the parameter passed in to SP in a query in the body of procedure. Any ideas why this is happening ?
Re: PLS-00306 wrong number or types of argument in call to [message #9622 is a reply to message #9618] Mon, 24 November 2003 09:51 Go to previous message
sverch
Messages: 582
Registered: December 2000
Senior Member
You have 3 parameters, not one and you have to list them all when you call your procedure:

DECLARE

p_num NUMBER
p_num1 NUMBER;
p_num3 NUMBER;

BEGIN
p_num3:= 0870321321;
p_num:=...
p_num1:=... (or select into, whatever)

get_count_of_dnis1(p_num3, p_num,p_num1);

END;
Previous Topic: rollup and cube
Next Topic: Problem for order
Goto Forum:
  


Current Time: Thu Apr 25 12:54:49 CDT 2024