Subject | Re: [ib-support] Stored procedure question |
---|---|
Author | Helen Borrie |
Post date | 2001-05-16T12:59:28Z |
At 02:52 PM 16-05-01 +0200, you wrote:
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?
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi,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.
>
> 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 :
>
>FOR SELECT .....
>
>INTO :v_InvoiceNo
>
>DO BEGIN
> --> 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 ??
>
>END
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?
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________