Hi guys,
I am planning to loop throu the rest of a collection elements substracting each time one
My code is:
declare
type tr is record(
id number,
ref varchar2(32)
);
type tc is table of tr;
col tc;
a tc;
b tc;
cursor c is
select ar_item_id,item_ref from ar_items where rownum < 5;
begin
open c;
fetch c bulk collect into col;
close c;
for i in col.first..col.last loop
b := tc();
b.extend;
b(1) := col(i);
a := tc();
a := col multiset except b;
dbms_output.put_line('colectia reminder '||i);
for n in a.first..a.last loop
dbms_output.put_line(a(n).ref);
end loop;
dbms_output.put_line(a.count);
end loop;
end;
but it fails with
ORA-06550: line 22, column 10:
PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
ORA-06550: line 22, column 5:
PL/SQL: Statement ignored
although with union instead of except works...
How to use a minus between collections?