Re: Procedures

From: Ewa M. <knowacz_NoSpam_at_usa.net>
Date: Sat, 24 Oct 1998 00:55:03 -0400
Message-ID: <36315DA7.40BE_at_usa.net>


Patrick Schlaepfer wrote:
>
> What's wrong here?
>
> create or replace procedure MY_PROC (langnr IN integer,
> specdefnr IN integer,
> termsort IN varchar2,
> refnr OUT integer)
> AS
> BEGIN
> select ref_html_nr
> INTO refnr
> FROM www_specdef_index
> where lang_nr = langnr and specdef_nr = specdefnr and
> term_sort like termsort;
> END;
> /
>
> Trying in SQL
>
> SQL> execute MY_PROC(0,5000,'807595');
> .....
> PLS-00306: wrong number or types of arguments in call to 'MY_PROC'
>
> Any solutions?

Hello,
In your example above I see two things:
(1)
You are calling MY_Proc with 3 parameters only while you have declared 4 alltogether, so you also have to deal with the output parameter; (2)
Since your input parameters langnr, specdefnr and termsort are used inside procedure, then you must declare them as IN OUT parameters, not only IN.
HTH.
Regards,
Eva Received on Sat Oct 24 1998 - 06:55:03 CEST

Original text of this message