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: DECLARE inside Stored Procedure/Function?

Re: DECLARE inside Stored Procedure/Function?

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 29 Jul 1998 03:00:51 GMT
Message-ID: <35c48a84.12573726@netnews.worldnet.att.net>


On Tue, 28 Jul 1998 17:32:23 -0500, James Arvigo <Hooper_X_at_Spam_Rage.com> wrote:

>I'm trying to create a stored function that makes use of
>some variables that need to be declared internally to the
>function.
>
>However, the "DECLARE" section of this code is being
>rejected,

>1 CREATE OR REPLACE FUNCTION radius.NewCallsFunc ()
>2 RETURN NUMBER IS
>3 rNumCalls NUMBER(10,0);
>4 DECLARE
>5 lNewCalls NUMBER(10,0);
>6 lOldCalls NUMBER(10,0);
>7 BEGIN
Get rid of the keyword DECLARE. It's not used with stored functions. Local variables get declared immediately following the CREATE command. For example, the variable rNumCalls is a local variable to your function.

Jonathan   Received on Tue Jul 28 1998 - 22:00:51 CDT

Original text of this message

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