Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: checking for the type in pl/sql
Hi Seth.
Using the IS OF TYPE() operator, for instance:
select treat(value(p) as student).dept
from persons p
where value(p) is of type(student);
HTH.
Finn Ellebaek Nielsen
ChangeGroup ApS
"Seth" <sgelberg_at_optonline.net> wrote in message
news:f3159b28.0210161535.3e90b8ed_at_posting.google.com...
> If i have several type in pl/sql with sub-type how do I check to see
> what type the instance is; for example in java I would use instanceof
>
> so if I have type:
>
> person
> student is sub type of person
> full time sub type of student
>
> faculty is sub type of person
> adjunct is sub type of faculty
>
> I want to check at runtime if my object istance is of type student,
> how do I do this.
Received on Thu Oct 17 2002 - 03:24:19 CDT