Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: cursor looping - best practices?
On Jun 15, 12:43 pm, spacemar..._at_mailinator.com wrote:
> On Jun 15, 12:30 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net>
> wrote:
>
> > The code you cite is, well, OLD code. I haven't written a loop like
> > that in years, what with the FOR and WHILE constructs available:
>
> > FOR myrec IN cursor LOOP
> > .... processing here
> > END LOOP;
>
> > No manual checking for the end of the data, no manual exit strategy.
>
> > For array processing a concise set of examples can be found at:
>
> >http://www.psoug.org/reference/array_processing.html
>
> ...great, i will check that out. thanks
>
> sm
To underscore and add a bit to hpuxrac's answer, there is a website http://asktom.oracle.com that you can peruse for examples and explanations. Tom's books contain some information to help transition your brain between what you are used to and Oracle.
A little more info about posting here: http://www.dbaoracle.net/readme-cdos.htm
And in general, time put into reading the Concepts manual (http:// tahiti.oracle.com and elsewhere) is well worth it, especially to understand transactions, concurrence and locking which are likely somewhat different than what you are used to. (foreign keys, too :-)
jg
-- @home.com is bogus. "If the db has been running for 10 years then why do you need to document it now?" - John HallasReceived on Fri Jun 15 2007 - 15:40:57 CDT
![]() |
![]() |