Re: ORA-907 using CAST with a table of records
Date: Wed, 3 Mar 2010 10:14:58 -0600 (CST)
Message-ID: <321d2c04076787a4df0dfad475d6ae98.squirrel_at_society.servebeer.com>
> Procedure or package doesn't matter. The problem is that SQL engine
> cannot see types defined in procedural units. Therefore CAST MULTISET
> on package types doesn't work. On the other hand if you create similar
> object type, I don't know how to cast from object type to local
> package type and/or vice versa.
[snip]
> Not too much code, although with one temporal object :)
I try to avoid temp objects if possible (unlike SQL Server!). From your reply, I'm going to attempt this with a defined TYPE in the schema. Worth a shot anyway. :)
> It seems other people agree it is not possible, at least for example here
> http://technology.amis.nl/blog/1217/sorting-plsql-collections-the-quite-simple-way-part-two-have-the-sql-engine-do-the-heavy-lifting
Yup! I've been attempting to adapt that example to my own situation. It seems to be *the* web article that everyone uses when trying to sort collections in PL/SQL.
> and here
> http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5189710445984
> they say that sql object types have to be used.
Nice! I missed that one. The reply near the bottom spells it out plainly.
Thanks again, Gints!
Rich
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Mar 03 2010 - 10:14:58 CST