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 -> Help with Cursors !

Help with Cursors !

From: Big George <jbeteta_at_gmail.com>
Date: 8 Aug 2006 17:12:25 -0700
Message-ID: <1155082345.004794.247950@h48g2000cwc.googlegroups.com>


Hello,

I need some help with code. I need to create and loop a cursor1 and then use cursor2 in order to store the rows that I am selecting in order to pass cursor2 for a datatable. Is that possible?

PROCEDURE My_SP(i_param IN INTEGER)
IS
 v_Field1 CHAR;
 v_rec INTEGER;
 CURSOR Cursor1
 IS
 SELECT Field1
 FROM MyTable ;
BEGIN
 OPEN Cursor1;
   LOOP
   FETCH Cursor1 INTO v_Field1;
   EXIT WHEN Cursor1%NOTFOUND;

   SELECT count('x') INTO v_rec FROM OtherTables    WHERE ThisField = v_Field1;
   IF v_rec > 0 THEN

Thank you very much Received on Tue Aug 08 2006 - 19:12:25 CDT

Original text of this message

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