Q: Hello, I ran the following code in the Oracle 9i database:
CREATE OR REPLACE TYPE persona as OBJECT (ident varchar2 (9), nombr varchar2 (30)); CREATE table Tper (per persona); INSERT into Tper values (Persona (' n ', ' Lucas ')); SELECT * from Tper;
Error occurred after system notification:
Ora-00932:inconsistent data type. Expected number get USUT7. Persona
What is the problem, please? How can i solve it?
A: I ran your DDL on the Oracle 11g R2 database:
CREATE OR REPLACE TYPE persona as Object (
ident varchar2 (9), nombr varchar2);
CREATE table Tper (per persona);
INSERT into Tper values (Persona (' n ', ' Lucas '));
INSERT into Tper values (Persona (' AAA ', ' Dan '));
SELECT * from Tper;
drop table tper;
Drop type persona;
The results are normal and there are no errors:
Type created.
Table created.
1 row created.
1 row created.
per--------------------------------------------------
($, Lucas)
(AAA, Dan)
2 rows selected .
Table dropped.
Type dropped.
I think your error may be a localized language setting problem. I recommend that you upgrade from Oracle 9i to Oracle 11g R2.