Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> What is a UDT?
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)Received on Sun Jul 06 2003 - 12:08:36 CDT