Re: Median Number pl-sql procedure not executing

From: Joost Bataille <j.r.l.m.batailleREMOVETHIS_at_uva.nl>
Date: Wed, 24 Oct 2001 18:18:12 +0200
Message-ID: <9r6pk2$54m$1_at_mail.ic.uva.nl>


"streamline" <small_bore_at_hotmail.com> wrote in message news:b1e9034f.0110240320.464d89c2_at_posting.google.com...
> I have this pl-sql procedure to work out the median value of a set of
> id numbers from a table.
>
> It created with no errors but when i execute in sqlplus i get:
>
> SQL> execute median_value;
> begin median_value; end;
>
> *
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00306: wrong number or types of arguments in call to
> 'MEDIAN_VALUE'
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
> Does any one have any ideas?

You've created your procedure with parameters:
> create or replace procedure MEDIAN_VALUE
> (news varchar2, id varchar2, median OUT number)

and then you call it without parameters.
> SQL> execute median_value;
That's when Oracle starts complaining...

I'd advise you to include the in or out value for your parameters like create or replace procedure MEDIAN_VALUE

    (news in varchar2, id in varchar2, median OUT number)

If you want to call your procedure you have to include the parameters in the call and if you use an out parameter you have to declare it. DECLARE
p_median number;
BEGIN
median_value( 'my_news', 'my_id', p_median); END; Hope this helps, regards, Joost

--
Joost Bataille
University of Amsterdam
Received on Wed Oct 24 2001 - 18:18:12 CEST

Original text of this message