Home » SQL & PL/SQL » SQL & PL/SQL » wrong number or types of arguments in call procedure
wrong number or types of arguments in call procedure [message #10009] Sun, 21 December 2003 22:24 Go to next message
resy
Messages: 86
Registered: December 2003
Member
SQL> create or replace procedure pp(n in varchar2, n2 out varchar2)
2 as
3 e emp.ename%type;
4 begin
5 select ename into e
6 from emp
7 where empno = 1000;
8 dbms_output.put_line(n);
9 n2 := e;
10 end;
11 /

Procedure created.

SQL> begin
2 dbms_output.put_line(pp('Hi'));
3 end;
4 /
dbms_output.put_line(pp('Hi'));
*
ERROR at line 2:
ORA-06550: line 2, column 22:
PLS-00306: wrong number or types of arguments in call to 'PP'
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

can nybody help me??
thanx in advance.
Re: wrong number or types of arguments in call procedure [message #10011 is a reply to message #10009] Sun, 21 December 2003 23:55 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
1. You have 2 parameters in your procedure: n, the input parameter and n2, the output parameter, so I call to this procedure should be like:
Declare
  v_test varchar2(200);
Begin
  pp('Hi',v_test);
End;
/
Your call
dbms_output.put_line(pp('Hi'));
is not possible either. You access a procedure as if it were a function. So, either change the procedure into a function or try a call like mentioned above.

MHE
Re: wrong number or types of arguments in call procedure [message #10012 is a reply to message #10011] Mon, 22 December 2003 01:20 Go to previous message
resy
Messages: 86
Registered: December 2003
Member
thanx. its working!!!!!!!!!
Previous Topic: To find the constraints on tables
Next Topic: To differentiate between numeric and char values in a char column
Goto Forum:
  


Current Time: Fri Apr 19 18:34:23 CDT 2024