PLS-00386: type mismatch found at '...' between FETCH cursor and INTO, but why ?

From: Spendius <spendius_at_muchomail.com>
Date: Mon, 11 Feb 2013 06:56:56 -0800 (PST)
Message-ID: <c314d640-a258-42f1-aa5e-287056882727_at_h9g2000vbk.googlegroups.com>



Hello,

Running this (on 10g R2):
> create or replace type dual_typ as object (ddat date);
> /
>
> create or replace type dual_tab as table of dual_typ;
> /
>
> declare
> cursor selDual_cur is select sysdate ddate from dual;
> selDual dual_tab;
>
> begin
>
> open selDual_cur;
> loop fetch selDual_cur bulk collect into selDual;
> exit when selDual.count = 0;
> dbms_output.put_line('ici');
>
> end loop;
>
> end;
> /
>

I always get error
PLS-00386: type mismatch found at 'SELDUAL' between FETCH cursor and INTO
on the "loop fetch selDual..." line... If I replace dual_typ as object (ddat date);
with dual_typ as object (ff varchar2(2)); and the cursor selDual with select 'xx' from dual there's no difference.

Someone has an idea perhaps ?
Thanks a lot.
Spendius Received on Mon Feb 11 2013 - 15:56:56 CET

Original text of this message