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: Help with CURSOR question, please?

Re: Help with CURSOR question, please?

From: <Huwski>
Date: Thu, 23 Jul 1998 15:37:43 GMT
Message-ID: <35b758ba.9845372@news.geccs.gecm.com>


On Thu, 23 Jul 1998 11:25:54 -0400, <agibbons_at_erols.com> wrote:

>Basically, where does the where statement go???
>
>Any advice would be much appreciated.
>
>Yours,
>
>Elliot G.
>
>
>My routine is below:
>

Cursor parameters my man!!!! what this will do is provide the query with a where clause value every time the cursor is opened

CURSOR cur2( cp_id Number ) IS
> SELECT e, f
> FROM b

    Where id = cp_id
> ORDER BY e, f ASC;

Begin

      FOR cr1_rec IN blah... loop
        Open cur2( c1_rec.id )        
        LOOP
           Fetch......
        End Loop
     End Loop;
End.......             

Hope this helps... Received on Thu Jul 23 1998 - 10:37:43 CDT

Original text of this message

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