Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem using MULTISET EXCEPT

Chaitanya.S.S.KJan 31 2008 — edited Mar 5 2013
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2013
Added on Jan 31 2008
9 comments
1,625 views