Subject RES: [firebird-support] How to iterate through the records
Author Carlos Arguilar
Hi Helen:
This look solves my problem.
Thanks.
Carlos

-----Mensagem original-----
De: Helen Borrie [mailto:helebor@...]
Enviada em: quinta-feira, 3 de março de 2005 10:09
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] How to iterate through the records

At 09:02 AM 3/03/2005 -0300, you wrote:

>Hello:
>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?

I don't think you mean "iterate".

This will do it:

SELECT FIRST 1 DATE_INI FROM SALE
WHERE DATE_INI < :DATE_INI
ORDER BY 1 DESC

You don't need a SP to do this.

If you want to iterate through a set in a SP, that is something else.
Ask
again with a suitable pseudocode example.

./hb






Yahoo! Groups Sponsor


ADVERTISEMENT

<http://us.ard.yahoo.com/SIG=129ej0tdj/M=298184.6018725.7038619.3001176/
D=groups/S=1705115386:HM/EXP=1109941726/A=2593423/R=0/SIG=11el9gslf/*htt
p:/www.netflix.com/Default?mqso=60190075> click here


<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=group
s/S=:HM/A=2593423/rand=904624976>

_____

Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/> Service.


[Non-text portions of this message have been removed]