Subject RE: [ib-support] DECLARE CURSOR in a SP
Author Bill Meaney
>>Can I
>>
>>DECLARE cCurs CURSOR FOR <select>;
>
>Nope. What I would try - and I think it will work -
>is to create three procedures: a driver (D) and two
>loopers (L1, L2).
>
> while (a = 1)
> begin
> select (x,y,z) from L1
> select (a,b,c) from L2
> whatever...
> end
>
>You'll put in appropriate logic to break out of the
>loop when you've hit eof.
>
>


With each iteration through the while (a = 1) loop, will the two SELECTs
just fetch the next row to be returned from L1 & L2 or are L1 & L2 only
expected to return 1 row?

In Delphi, I do a Query.Next to fetch subsequent rows of Query after it is
opened. I don't see how the stored procedure snippet above fetches
subsequent rows of L1 & L2.

I'm sorry if I'm missing the obvious.

Bill Meaney