On 30/09/2018 06:25, Dimitry Sibiryakov wrote: > 30.09.2018 4:52, Adriano dos Santos Fernandes wrote: >> - Instead of agg_finished, adjust SUSPEND (probably with another >> keyword) to somehing like: SUSPEND WHEN FETCHED DO <statement> WHEN >> FINISHED DO <statement> > > Isn't it how FETCH is used to be used: > > WHILE (1 = 1) DO > BEGIN > FETCH C INTO :RNAME; > IF (ROW_COUNT = 0) THEN > LEAVE; > END > Usage of FETCH seems good here, then I believe the production of rows would need a YIELD <value>.
And since FETCH and YIELD will be loose coupled, I think subsequent fetches without YIELD should return the last yielded value. This is weird, but maybe acceptable for one not following a standard approach. Adriano Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel