Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the code below in Oracle SQL Live I keep getting an error message for the last 4 INSERTS. The error message is: ORA-00932: inconsistent

Using the code below in Oracle SQL Live I keep getting an error message for the last 4 INSERTS. The error message is: ORA-00932: inconsistent datatypes: expected DATE got NUMBER. How do I correct that error?

CREATE TABLE BASE ( BASENUM CHARACTER(3) NOT NULL, BASECITY varchar(20), BASESTATE CHARACTER(2), BASEPHON varchar(10), BASEMGR varchar(10), PRIMARY KEY (BASENUM) );

CREATE TABLE TYPE ( TYPENUM CHARACTER(1) NOT NULL, TYPEDESC varchar(30), PRIMARY KEY (TYPENUM) );

CREATE TABLE TRUCK ( TNUM CHARACTER(4) NOT NULL, BASENUM CHARACTER(3), TYPENUM CHARACTER(1), TMILES DECIMAL(7,1) NOT NULL, TBOUGHT DATE, TSERIAL varchar(20), FOREIGN KEY (BASENUM) REFERENCES BASE(BASENUM), FOREIGN KEY (TYPENUM) REFERENCES TYPE(TYPENUM), PRIMARY KEY (TNUM) ); INSERT INTO BASE VALUES('501','Dallas','TX','893-9870','J. Jones'); INSERT INTO BASE VALUES('502','New York','NY','234-7689','K. Lee');

SELECT * FROM BASE;

INSERT INTO TYPE VALUES('1','single box,double axle'); INSERT INTO TYPE VALUES('2','tandem trailer,single axle');

SELECT * FROM TYPE;

INSERT INTO TRUCK VALUES('1001','501','1',5900.2,11/08/90,'aa-125'); INSERT INTO TRUCK VALUES('1002','502','2',64523.9,11/08/90,'ac-213'); INSERT INTO TRUCK VALUES('1003','501','2',32216.0,09/29/91,'ac-215'); INSERT INTO TRUCK VALUES('1004','','2',3256.9,1/14/92,'ac-315');

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions