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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Delete in a Stored Procedure?

Re: Delete in a Stored Procedure?

From: david_g <david_l_gouldNOdaSPAM_at_yahoo.com.invalid>
Date: Mon, 17 Jan 2000 01:35:38 -0800
Message-ID: <05a4d7f6.3e80eb40@usw-ex0106-048.remarq.com>


Are you doing something like...?

declare

     cursor c_mycur

         is select col1,col2,col3

         from mytable

         where col1 = myvalue;

     v_col1 mytable.col1%type;

     v_col2 mytable.col2%type;

     v_col3 mytable.col3%type;

begin

    open c_mycur;

    loop

      fetch c_mycur into

            v_col1,v_col2, v_col3;

      exit when c_mycur%notfound;

...

      your processing

...

      if <your delete condition> then

         delete from mytable

            where current of c_mycur;

      end if;

    end loop;

    close c_mycur;

end;

Received on Mon Jan 17 2000 - 03:35:38 CST

Original text of this message

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