Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What is a UDT?

Re: What is a UDT?

From: DJ <nospamplease_at_goaway.com>
Date: Mon, 7 Jul 2003 00:17:12 +0100
Message-ID: <_52Oa.4123$ju6.74415@newsfep4-glfd.server.ntli.net>

"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message news:3F089E1E.22E04581_at_exxesolutions.com...
> DJ wrote:
>
> > "Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
> > news:3F085794.64CF69C_at_exxesolutions.com...
> > > Oracle 9.2.0.2.0 on Win2K
> > >
> > > Got the following error message:
> > > 'ORA-00932: inconsistent datatypes: expected UDT got CHAR'
> > > by the following route:
> > >
> > > CREATE OR REPLACE TYPE person_typ AS OBJECT (
> > > ssn NUMBER, name VARCHAR2(30), address VARCHAR2(100))
> > > NOT FINAL;
> > > /
> > >
> > > CREATE OR REPLACE TYPE person_tab_typ
> > > AS TABLE OF person_typ;
> > > /
> > >
> > > CREATE OR REPLACE TYPE student_typ UNDER person_typ (
> > > deptid NUMBER, major VARCHAR2(30))
> > > NOT FINAL;
> > > /
> > >
> > > CREATE OR REPLACE TYPE student_tab_typ
> > > AS TABLE OF student_typ;
> > > /
> > >
> > > CREATE TABLE test (
> > > regular_field DATE,
> > > person_nested_tab person_tab_typ,
> > > student_nested_tab student_tab_typ)
> > > NESTED TABLE person_nested_tab STORE AS per_tab
> > > NESTED TABLE student_nested_tab STORE AS stu_tab;
> > >
> > > INSERT INTO test
> > > VALUES
> > > (SYSDATE, person_tab_typ(), student_tab_typ());
> > >
> > > INSERT INTO test
> > > VALUES
> > > (SYSDATE, person_tab_typ('111223456', 'Morgan', '123 Main Street'),
> > > student_tab_typ());
> > >
> > > Now I know I intentionally tried to stuff a string into a NUMBER
column
> > > so please don't point out the obvious ... but ...
> > > a search of tahiti and metalink provides not a clue as to the meaning
of
> > > the error message. Any help will be appreicated.
> > >
> > > As I ask in the subject ... what is a UDT? And how about it Oracle?
How
> > > about a definition of this term?
> > >
> > > Thanks.
> > > --
> > > Daniel Morgan
> > > http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> > > damorgan_at_x.washington.edu
> > > (replace 'x' with a 'u' to reply)
> > >
> > >
> >
> > user defined type?
>
> Thanks.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
>

just guessing mind, sounds rights though Received on Sun Jul 06 2003 - 18:17:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US