Subject RE: [ib-support] Stored procedure question
Author Nico Callewaert
Hi Helen,

I did it that way with local variables, so I can refer to the previous row.
I was just wondering if there was another way. But I was expecting a ** no
**, because of the iteration process.

Thanks for the help,

Nico Callewaert

-----Oorspronkelijk bericht-----
Van: Helen Borrie [mailto:helebor@...]
Verzonden: woensdag 16 mei 2001 14:59
Onderwerp: Re: [ib-support] Stored procedure question

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 ยท

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to