這是表ORA-01858:在預期數字的地方找到了一個非數字字符?即使數值是數字?
CREATE TABLE Employee
(EmpID number(5) primary key,
SIN Number(9) Not null,
LastName Varchar2(25) Not null,
FirstName Varchar2(25),
Street Varchar2(30),
City Varchar2(25),
Province Char(2),
PostalCode Varchar2(7),
JobCode Number(4) Not null,
Foreign Key(JobCode) REFERENCES Job,
IncomeTax Char(1),
BirthDate Date,
HireDate Date,
JobCodeDate Date)
TABLESPACE users;
這是我試圖插入行,只有三個數值和所有這些都是數字,據我所看到的。
INSERT INTO Employee VALUES(97319,516303417,'Novak','Gerry','6803 Park Ave.','Moose Jaw','SK','S6H 1X7',3000,'N','24-Aug-86','07-Jul-03','07-Jul-03');
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
我相信它抱怨日期。嘗試使用'to_date('25 -AUG-1986','DD-MON-YYYY') –
@KevinBowersox這取決於他的NLS_DATE_FORMAT,對吧? – CJBS
@CJBS不知道,我只是在玩預感,內部的日期存儲爲以毫秒爲單位的時間或數字,並傳遞字符串導致問題,我的sql提琴似乎工作。 –