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: Newbie cursor question

Re: Newbie cursor question

From: Mark G <markag_at_wonderstats.com>
Date: 2000/08/10
Message-ID: <F4155D9F9AA4D111B9990020AFBA52D53EB55D@class06.ip061.sfi-software.com>#1/1

How about:

DECLARE
CURSOR C1 IS
    SELECT *
    FROM MY_TABLE;    blnOk BOOLEAN;

    BEGIN
        FOR REC IN C1 LOOP

          IF  blnOk  THEN
            -- start real processing here

         END IF;

    end Loop;

"Lisa Adcock" <ladcock_at_ford.com> wrote in message news:8murv1$fqq2_at_eccws12.dearborn.ford.com...
> I have a cursor and I would like to do some data validation on each row in
> the cursor before the "real" processing begins. I would like to organize
 my
> as follows but am having problems finding the right language
> construct/reserved word.
>
> for emp_record in cur_employees loop
>
> if this row has a data problem then
> continue onto next row in cursor
> end if
>
> -- start real processing here
>
> end
>
> I can solve my problem by putting the "real" processing in the elsif part
 of
> the if statement, but the processing logic already involves three nested
 ifs
> and I don't want to indent them another level by putting them in the
 elsif.
>
> Any ideas would be appreciated!
>
Received on Thu Aug 10 2000 - 00:00:00 CDT

Original text of this message

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