Re: Need Help With SQL*Forms & Looping Within A Block

From: Roy Johnson <rjohnson_at_shell.com>
Date: Tue, 13 Jul 1993 20:49:33 GMT
Message-ID: <RJOHNSON.93Jul13144933_at_conus.shell.com>


fgreene_at_hayes.com writes:

   DECLARE
           loop_control NUMBER := 1;
   BEGIN

	   GO_RECORD('1');
	   WHILE loop_control = 1 LOOP


(insert your case specific code here)
IF :system.last_record = 'TRUE' THEN loop_control := 0; ELSE NEXT_RECORD; END IF; END LOOP;

   END; Or, a little more tersely:

BEGIN

	GO_RECORD('1');
	LOOP

(insert your case specific code here)
IF :system.last_record = 'TRUE' THEN EXIT; END IF; NEXT_RECORD; END LOOP;

END;
--
-------- Roy Johnson ---- rjohnson_at_shell.com ---- Speaking for myself --------
"When the only tool you have is Perl, the whole | "Hooray for snakes!"
 world begins to look like your oyster." -- Me  |  -- The Simpsons (29 Apr 93)
Received on Tue Jul 13 1993 - 22:49:33 CEST

Original text of this message