create or replace type t_money as object (
val number(14,2)
,cur varchar2(3 CHAR)
);
Type created.
create or replace type t_wallet as object (
name varchar2(50 CHAR)
,amount t_money
);
Type created.
create or replace type t_wallets is table of t_wallet;
Type created.
declare
walletCollection t_wallets;
cursor walletCursor is
select 'some name' as name
,t_money(99, 'EUR') as amount
from dual;
begin
open walletCursor;
fetch walletCursor bulk collect into walletCollection;
close walletCursor;
end;
ORA-06550: line 9, column 40: PLS-00386: type mismatch found at 'WALLETCOLLECTION' between FETCH cursor and INTO variablesMore Details: https://docs.oracle.com/error-help/db/ora-06550