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 -> PL/SQL Variable Question

PL/SQL Variable Question

From: Moore <rlmoore_at_purdue.edu>
Date: Thu, 9 Mar 2000 13:54:25 -0500
Message-ID: <Pine.SOL.4.10.10003091350550.18777-100000@herald.cc.purdue.edu>


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; Received on Thu Mar 09 2000 - 12:54:25 CST

Original text of this message

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