[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR cycle
On Tue, 29 Apr 1997, Michael Bower wrote:
> Hello,
> I am running an SQR that does a begin-select from a table. I then want to
> process those records selected but I do not want the select to continuously
> run every time a new record is needed. For example:
>
> Begin-Select
>
> Customer,
> Customer_Number
>
> Do Main-Processing (which includes a commit statement)
>
> From
> Customer_Table
>
> Where Customer_Number = 0
>
> End-Select
>
Hi Michael,
What DB are you using? On Oracle a cursor
will be established when the begin-select is encountered and then it
will continue to fetch a row and do Main-Processing until it runns out
of rows in the query or encounters a exit-select. Some interesting
problems can arise if you are updating the same table that you are
selecting from. What specific symtoms are you having or what situation
are you trying to avoid?
Hope this helps,
Eric
------------------------------------------------------------------------
Eric Eastman | Ray Ontko & Co. | Adverbs are endangered; act quickly.
erice@ontko.com | Richmond, IN | http://www.ontko.com/, ftp.ontko.com
- References:
- SQR cycle
- From: Michael Bower <MB0526@AOL.COM>