Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calling functions...
In article <7qmh04$ugt$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.
>
> 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.
>
HEllo,
IF 'FOO' is a function it should return a value and if so this value should be assigned to a variable of the return data type of 'FOO'. You don't have that. I guess that is what caused the error.
Take care,
Ashok
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Sep 02 1999 - 14:49:57 CDT
![]() |
![]() |