Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Calling functions...

Re: Calling functions...

From: <michael_bialik_at_my-deja.com>
Date: Thu, 02 Sep 1999 19:57:12 GMT
Message-ID: <7qmkqh$1f9$1@nnrp1.deja.com>


Hi.

 Is FOO a function or procedure.
 You wrote it's a function, but you calling a procedure  inside IF statement.
 Try :
  IF year LIKE '1999/2000' THEN
   zzz := foo ( ... );
  END IF;  Define zzz as variable in DECLARE section ( before BEGIN ).

 Good luck. Michael.

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.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Sep 02 1999 - 14:57:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US