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: <spacemarine_at_mailinator.com>
Date: Fri, 15 Jun 2007 09:36:41 -0700
Message-ID: <1181925401.835405.129300@u2g2000hsc.googlegroups.com>


On Jun 15, 11:11 am, sybra..._at_hccnet.nl wrote:
> Obviously this is a version dependent question.

not so obvious at all -- otherwise i would have specified. i was unaware of that difference between version. thanks.

> I always failed to see why people posting here assume everyone here
> is a mindreader and/or keeps track of versions in use.

perhaps i can offer you some insight. i come from the MS SQL world, and little has changed over the years... what i learned in 2000 is still what i use today in MS SQL, little has changed. in fact its not uncommon to find SQL Server 2000 db instances in production use. i dont know about previous versions because they are no longer found in production in my experiences.

i cant speak for others, but thats why when i ask about a best practice its not obviously apparent to me that there may be dramatic differences between what people are actively using in production.

> So the best practice is NOT to use CURSOR FOR loops.

interesting. i am reviewing some found-code and i see a technique like so:

    LOOP

            IF c_someCursor%FOUND THEN
              --doing stuff: CASE value tests, dynamic variable
assignments..
            END IF

    END LOOP ...it almost seems like an app programmer style, and not what ive typically seen in T-SQL, so im curious about it w/ regards to PL SQL

thanks for the info.

sm Received on Fri Jun 15 2007 - 11:36:41 CDT

Original text of this message

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