Just a simple COUNTER eh? (#_at_!*#)

From: Allison Rothmel <ad041_at_Freenet.carleton.ca>
Date: Tue, 6 Jul 1993 05:15:11 GMT
Message-ID: <C9q99C.1DA_at_freenet.carleton.ca>


I've really been playing with this one for too long! I run ORACLE on a 486. What I want is a simple counter that increments on NEXT_RECORD and decrements on PREVIOUS_RECORD.

My first attempts seemed simple enough, and the funny thing is is that the decrement trigger works if I manually increase the counter.

	NEXT_RECORD;
	SELECT :BLOCK.FIELD + 1
	INTO :BLOCK.FIELD
	FROM DUAL;

	PREVIOUS_RECORD;
	SELECT :BLOCK.FIELD - 1
	INTO :BLOCK.FIELD
	FROM DUAL;

There has to be a fool-proof easy method short of defining elaborate procedures. Why am I having such a tough time???

Oh yah... and the count field begins with a 2. Much appreciated.

-- 
Received on Tue Jul 06 1993 - 07:15:11 CEST

Original text of this message