Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Variable Question
No, you don't.
HTH. Michael.
In article <Pine.SOL.4.10.10003091350550.18777-
100000_at_herald.cc.purdue.edu>,
Moore <rlmoore_at_purdue.edu> wrote:
> Ladies and Gentlemen,
>
> Do I need to "clear out" variables at the end of a function (i.e.
below)?
>
> If so, how? I have looked in a few places without any luck.
>
> TIA
>
> CREATE OR REPLACE
> FUNCTION AR_Balance (cust_code IN NUMBER, prem_code IN VARCHAR2)
RETURN
> NUMBER IS
> nbal NUMBER(10,2);
> BEGIN
> SELECT SUM(NVL(uabopen_balance, 0))
> INTO nbal
> FROM uimsmgr.uabopen
> WHERE uabopen_cust_code = cust_code
> AND uabopen_prem_code = prem_code;
>
> RETURN(nbal);
>
> EXCEPTION
> WHEN NO_DATA_FOUND THEN
> RETURN(0);
>
> \* Should I null nbal here?
> END;
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 09 2000 - 14:28:17 CST
![]() |
![]() |