Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with cursor
You *may* have to alias your fields in your cursor for the Sum(amt_paid) and
the count(*) fields. Only 50% sure though ;-(
If not, post the code in and around line 80.
M
<amerar_at_ci.chi.il.us> wrote in message news:7tku7n$kdi$1_at_nnrp1.deja.com...
>
>
>
> Hello,
>
> I am getting this error message when I try to run my procedure:
> ERROR at line 1:
> ORA-01001: invalid cursor
> ORA-06512: at "CASH_DEVEL.EJ1_PH_TELLER_CNT", line 88
> ORA-06512: at line 1
>
> Here is my cursor:
>
> CURSOR ph_curs is
> select batchnum, sum(amt_paid), count(*)
> from payment_history where
> amt_paid > 0 and
> date_time_batch_closed > TO_DATE('100519991915','MMDDYYYYHH24MI') and
> date_time_batch_closed <= TO_DATE('100619991915','MMDDYYYYHH24MI')
> GROUP BY batchnum;
> v_ph ph_curs%ROWTYPE;
> .
> .
> .
> LOOP
> BEGIN
> FETCH ph_curs INTO v_ph;
> EXIT WHEN ph_curs%NOTFOUND;
> .
> .
> .
>
> What is wrong with my definition? Can anyone help?
>
> Thanks,
>
> Arthur
> amerar_at_ci.chi.il.us
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Oct 12 1999 - 03:00:08 CDT