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!

ORA-22950: cannot ORDER objects without MAP or ORDER method

667651Jan 26 2009 — edited Jan 28 2009
I have an example type below which I use in a stored proc shown below:- I use this to bulk collect into and use in other procs. The problem is that when I call the sotred proc I get an error : ORA-22950: cannot ORDER objects without MAP or ORDER method. I can use UNION ALL and this problem is avoided but I am not sure how to implement an ORDER method. All I need to do is basically be given the ability to union within stored procs using this type. Can anyone help, I am quite new to this and struggling with why this is needed when the 2 objects I am using the Union on are both the same with all the params in the right order? Any help will be great. I cannot seem to find a good example of how I sort this out.

-------------------------- TYPE ----------------------------------------

create or replace TYPE customer AS OBJECT, I do have a table type of this type also.

(

CusNumber NUMBER,

CusName NVARCHAR2(100),

CusAddress NVARCHAR2(100),

);

Not all shown just illustrating my problem

out_rec customer_TableType;

SELECT customer (CusNumber, CusName , CusAddress )
BULK COLLECT INTO out_rec
FROM customerTable
UNION
SELECT customer (SupNumber, SupName , SupAddress )
FROM Supplier
WHERE (SupNumber= pNumber):

Error: ORA-22950: cannot ORDER objects without MAP or ORDER method


??????
This post has been answered by Frank Kulash on Jan 28 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2009
Added on Jan 26 2009
6 comments
15,212 views