## Never overestimate the power of PL/SQL; 
## use SQL whenever possible

    DECLARE
	CURSOR C1 IS
	SELECT	 fld1, fld2 
	FROM 	 summary_table
	WHERE	 fld3 =  1234;
	xfld1	 number;
	xfld2 	 number;
	xfld_tot number;
    BEGIN
	OPEN C1;
	FETCH C1 into xfld1, xfld2;
	xfld_tot := xfld1 + xfld2;
	UPDATE	 summary_table
	SET	 fld1 = 0,
		 fld2 = 0,
		 fld3 = xfld_tot
	WHERE	 fld4 = 1234;
    END;


## Should be coded as :-

    BEGIN
	UPDATE	 summary_table
	SET	 fld1 = 0,
		 fld2 = 0,
		 fld3 = fld1 + fld2
	WHERE	 fld4 = 1234;
    END;
