Subject Re: [ib-support] Stored procedure question
Author Helen Borrie
At 02:52 PM 16-05-01 +0200, you wrote:
> I have a stored procedure with a FOR SELECT on it. The question now is :
>is there a way to see the value of the next record of the query ? To make
>it more clear, it looks like this :
>INTO :v_InvoiceNo
> --> Here I have the value of v_InvoiceNo for each record, but is it
>possible to "see" the value of the one that will come next ??

If you mean can it see the next row in selected dataset, no, because it is iterating through the rows as they are returned. If you mean, can it see the next number in the sequence, yes, if you use ORDER BY DESC.

If that doesn't solve it, look at the logic another way. If you create local variables in which to store (NOT select into!) the values of the columns of the **previous** row, you can refer to them when you fetch the **next** row, right? Would that solve it?


All for Open and Open for All
InterBase Developer Initiative ยท