Hi,
> There are many cases when this won't work. For example, read records
> until the sum of a column exceeds a limit.
I'm not saying server side cursors is not imporant (it is!), but this
problem you describe can be solved without server side cursors:
drop table test;
create table test(x int primary key) as select x from system_range(1, 100);
set @sum = 0;
select x, @sum := @sum + x as sum from test where @sum < 10 order by x;
This will select one row too much. If this is a problem, use:
select x, @sum as sum from test where (@sum := @sum + x) < 10 order by x;
Anyway, I have already started to implement server side cursors, this
is now very high on the list.
Regards,
Thomas