Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Calling functions...
In article <7qmgo5$u64$1_at_nnrp1.deja.com>,
ropru_at_my-deja.com wrote:
> I would like to now if it's possible to call function (or procedure)
> from another function or porocedure.
You have to assign the return value from the function to a variable. e.g.
vret := foo(v_id, v_examount);
>
> 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.
>
> Thanks
>
> Roman
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Sep 02 1999 - 14:45:57 CDT
![]() |
![]() |