错误=sql状态:42703,正在尝试将数据插入到我的表中

ygya80vv  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(337)

我有一个sql状态:
42703错误(错误:关系“eventrequest”的“datereq”列不存在)
在尝试向我的表中插入数据时。但我看不出有什么问题。你能帮忙吗?是datereq值似乎与“eventrequest”表中的datereq列不匹配。
下面是我写的代码
表格:

CREATE TABLE EventRequest 
(EventNo VARCHAR(8) CONSTRAINT EventNoNotNull NOT NULL, 
 DateHeld DATE CONSTRAINT DateHeldNotNull NOT NULL, 
 DateReq DATE CONSTRAINT DATEREQNotNull NOT NULL, 
 CustNo VARCHAR(8) CONSTRAINT CustNoNotNull NOT NULL, 
 FacNo VARCHAR(8) CONSTRAINT FacNoNotNull NOT NULL, 
 DateAuth DATE, 
 Status VARCHAR(10) CONSTRAINT StatusNotNull NOT NULL CHECK (Status IN('pending','Denied','Approved')),
 EstCost DECIMAL(12,2) CONSTRAINT EstCostNotNull NOT NULL, 
 EstAudience INTEGER CONSTRAINT EstAudienceNotNull NOT NULL CHECK (EstAudience>0),
 BudNo VARCHAR(10),
  CONSTRAINT PK_EVENTREQUEST PRIMARY KEY (EventNo),
CONSTRAINT FK_FACNO FOREIGN KEY (FacNo) 
   REFERENCES FACILITY (FacNo),
CONSTRAINT FK_CUSTNO FOREIGN KEY (CustNo) 
   REFERENCES CUSTOMER (CustNo) );

数据输入:

Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E100','2018-10-25','2018-06-06','C100','F100','2018-06-08','Approved',5000,80000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E101','2018-10-26','2018-07-28','C100','F100',NULL,'Pending',5000,80000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E103','2018-09-21','2018-07-28','C100','F100','2018-08-01','Approved',5000,80000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E102','2018-09-14','2018-07-28','C100','F100','2018-07-31','Approved',5000,80000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E104','2018-12-03','2018-07-28','C101','F101','2018-07-31','Approved',2000,12000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E105','2018-12-05','2018-07-28','C101','F101','2018-08-01','Approved',2000,10000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E106','2018-12-12','2018-07-28','C101','F101','2018-07-31','Approved',2000,10000,'B1000');
Insert into EVENTREQUEST (EVENTNO,DATEHELD,DATEREQ,CUSTNO,FACNO,DATEAUTH,STATUS,ESTCOST,ESTAUDIENCE,BUDNO) values ('E107','2018-11-23','2018-07-28','C105','F100','2018-07-31','Denied',10000,5000,null);

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题