Troubleshoot data type inconsistencies in Oracle 9i databases

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.