0

I created a table in oracle10g using following query......

  CREATE TABLE  "EMPLOYEESTASKS" 
  ( "EMPLOYEEID" NUMBER, 
"TASKDATE" VARCHAR2(40), 
"STATUS" NUMBER, 
"CUSTOMERID" NUMBER, 
"ADDRESS" VARCHAR2(400) NOT NULL ENABLE, 
"TASKTIME" VARCHAR2(40) NOT NULL ENABLE, 
"VISITDATE" VARCHAR2(40), 
"VISITTIME" VARCHAR2(40), 
 CONSTRAINT "EMPLOYEESTASKS_PK" PRIMARY KEY ("EMPLOYEEID", "TASKDATE", "TASKTIME") ENABLE, 
 CONSTRAINT "EMPLOYEESTASKS_FK" FOREIGN KEY ("EMPLOYEEID")
  REFERENCES  "EMPLOYEES" ("ID") ON DELETE CASCADE ENABLE
 )

Table was created successfully... but the problem is while iam trying to insert a row into the table it is showing the error

   ORA-01722: invalid number

The query i used is ,

 insert into employeestasks values(12305,'30-11-2011','09:00',0,45602,'Sarpavaram Junction ,kakinada',null,null)

What is that invalid number..??

1 Answer 1

3

It look like your columns in the table are ordered employeeid, taskdate, status, and you're trying to insert '09:00' into status, which is a number. This is no good. You need to use the same order of columns or specify which value is for which column.

Also, you really like capslock, huh?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.