ORA-22950: cannot ORDER objects without MAP or ORDER method
667651Jan 26 2009 — edited Jan 28 2009I 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
??????