Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Variable Question
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?
![]() |
![]() |