I am trying to get the difference between the data of collection records into another collection record. I am trying using MULTISET EXCEPT to get that difference (don't know whether it is a right approach). The following is a sample of the idea I am trying to implement, but I am facing problems such as
PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
The sample code is as follows:
create type mytype_obj is object(c1 varchar2(100),c2 number(10));
declare
type mytype is table of mytype_obj index by binary_integer;
x mytype;
y mytype;
z mytype;
begin
x(1):= mytype_obj('Chaitanya',1001);
x(2):= mytype_obj('SSK',1002);
y(1) := mytype_obj('Chaitanya',1001);
z := x multiset except y;
end;
Request to suggest whether if this is a correct approach, and if it is how to use MULTISET EXCEPT to get the difference between the nested collections?
A sample example would help me.