Re: Calling functions...

From: Russ Whiteman <russw_at_inlink.com>
Date: Thu, 2 Sep 1999 22:43:47 -0500
Message-ID: <7qngeh$9f1$1_at_news1.inlink.com>


ropru_at_my-deja.com wrote in message <7qmhcf$usk$1_at_nnrp1.deja.com>...
>I would like to now if it's possible to call function (or procedure)
>from another function or porocedure.
>
> Here is the code:
>
> CREATE OR REPLACE function doit
> (v_idnumber payment.idnumber%TYPE)
> RETURN NUMBER
> IS
> v_dexpect VARCHAR2(10);
> v_id NUMBER;
> v_examount NUMBER;
> BEGIN
> SELECT year, idnumber, expectamount
> INTO v_dexpect, v_id, v_examount
> FROM payment
> WHERE idnumber = v_idnumber;
> IF year LIKE '1999/2000' THEN
> foo(v_id, v_examount);
> END IF;
> RETURN 1;
> END doit;
> /
>
>where "foo" is another function. I got error message that:
>
>"PLS-00221: 'FOO' is not a procedure or is undefined"
>
>Foo was created earlier without compliation errors.
>

If foo is a function, you need to assign the output to a variable, or do something with it... your syntax implies it's a procedure that does not return a value, or only does so via one of the parameters. Received on Fri Sep 03 1999 - 05:43:47 CEST

Original text of this message