Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored Function Problem
Try
CREATE OR REPLACE FUNCTION radius.NewCallsFunc RETURN NUMBER IS
rNumCalls NUMBER(10,0); lNewCalls NUMBER(10,0); lOldCalls NUMBER(10,0); BEGIN SELECT COUNT(*) INTO lOldCalls FROM radius.old_calls; SELECT COUNT(*) INTO lNewCalls FROM radius.new_calls;
rNumCalls := lOldCalls + lNewCalls;
RETURN(rNumCalls);
END;
/
The DECLARE keyword is not used in stored functions/procedures. It is however used in anonymous PL/SQL blocks.
Hope this helps ... Received on Tue Jul 28 1998 - 18:46:02 CDT
![]() |
![]() |