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!

PL/SQL InstanceOf Operator?

95665Aug 8 2002
I have three objects, two of which are descendants of the same supertype. I then declare a collection to contain the supertype. Within PL/SQL I can create instances of the subtypes and place them in the collection, but how can I programmatically determine the type when I go to get the object back out of the collecton? I found an IS OF clause in the documentation, but this appears to be a SQL operator. I get an error if I try to do something like "IF v_obj IS OF some_obj_type THEN ..." Is there something like Java's InstanceOf operator to test for a class type at runtime?

I am using 9.0.1. Thanks for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2002
Added on Aug 8 2002
8 comments
992 views