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!

Error While Executing the Stored Procedure

448198Sep 7 2005 — edited Sep 7 2005
Hi,

Please excuse if I am asking a very simple question. I am learning Oracle procedures now. I could write procedure to insert data to table, but my requirement is something like to take user input, retrieve data from a table and display.

To do that, first I created a small procedure as follows. This procedure does compile withot any error. But when I execute, it gives error. As I know we need to pass value only for IN parameters and not for OUT parameters. Very confused as it says wrong number of arguments. Please see after the procedure the details of the error meggage. Can anyone help me please?


CREATE OR REPLACE PROCEDURE p_test1
(p_col1 in out t_table.REP_DATE%type,
p_col2 out t_table.WKFLID%type)
AS
begin
select wkflid,rep_date into p_col1, p_col2
from t_table where
rep_date = p_col1;
DBMS_OUTPUT.PUT_LINE(p_col1||p_col2);
END p_test1;
/

========================

10:18:50 SQL> exec p_test1('20060910');
BEGIN p_test1('20060910'); END;

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


Elapsed: 00:00:00.00
10:19:04 SQL> exec p_test1('20060910','');
BEGIN p_test1('20060910',''); END;

*
ERROR at line 1:
ORA-06550: line 1, column 15:
PLS-00363: expression '20060910' cannot be used as an assignment target
ORA-06550: line 1, column 26:
PLS-00363: expression '' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2005
Added on Sep 7 2005
6 comments
1,688 views