Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: cursor looping - best practices?

Re: cursor looping - best practices?

From: joel garry <joel-garry_at_home.com>
Date: Fri, 15 Jun 2007 13:40:57 -0700
Message-ID: <1181940057.690822.195730@d30g2000prg.googlegroups.com>


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 Hallas
Received on Fri Jun 15 2007 - 15:40:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US