Subject Re: [firebird-support] How to iterate through the records
Author Martijn Tonies
Hello Carlos,

> I would like know if exists a manner of iterate through the records
> inside a stored procedure. For instance:
> I created a sp with following statement:
> .
> SELECT DATE_INI FROM SALE WHERE DATE_INI = :VDATE;
> .
> Well, I need, next, retrieve the record prior to the record retrieve for
> the select clause above.
> How to do it?

In you get your resultset (like from the SELECT statement above),
then what is the "record prior to the record retrieved" from the resultset?

Quick answer: there isn't any. You only have the resultset (being a single
row, no row or multiple rows) to deal with.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com