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

Home -> Community -> Mailing Lists -> Oracle-L -> Insert record to tables with type is not working

Insert record to tables with type is not working

From: Mosy Lo <mlo_at_JCICorp.com>
Date: Fri, 11 Aug 2000 14:25:23 -0400
Message-Id: <10586.114393@fatcity.com>


Hi, everybody

I followed Oracle8 Design Uning UML Object Modeling by Paul Dorsey to create my data model. I like the idea of creating object type and table using the object.

Here is an example:

CREATE OR REPLACE TYPE STATUS AS OBJECT ( COL CHAR(1))
/

CREATE TABLE BUS_BUS_BILLING (

       STATUS               STATUS  NOT NULL,
       OBJID_BUS_BUS_BILLING NUMBER (10,0) NOT NULL PRIMARY KEY,
       PAY_METHOD           VARCHAR2(20) NULL)

INSERT STATEMENT:
INSERT INTO BUS_BUS_BILLING (STATUS, OBJID_BUS_BUS_BILLING, PAY_METHOD) VALUES ('A', 123, 'VISA')   *
ERROR at line 1:
ORA-00932: inconsistent datatypes

First, I found that I canNOT have the primary key using object. Other than that, I can use object everywhere and all the tables are created. Problems occurred when I tried to insert records to the table. This the error message I got the columns using object type:

I am logon as the object / table owner.

Can anybody please to point out why it is no working? Thanks a million. Received on Fri Aug 11 2000 - 13:25:23 CDT

Original text of this message

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