插入查询在oracle10g中显示错误

发布于 2024-12-12 21:29:21 字数 815 浏览 2 评论 0原文

我使用以下查询在 oracle10g 中创建了一个表......

  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
 )

表已成功创建......但问题是当我尝试向表中插入一行时,它显示错误

   ORA-01722: invalid number

我使用的查询是,

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

那是什么无效号码..?

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..??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小…楫夜泊 2024-12-19 21:29:21

看起来表中的列按员工 ID、任务日期、状态排序,并且您尝试将“09:00”插入到状态中,这是一个数字。这可不行。您需要使用相同的列顺序或指定哪个值对应哪个列。

另外,你真的很喜欢大写锁定,是吗?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文