Reputation: 9
Oracle SQL says this error ORA-00917: missing comma. Can you explain what's wrong?
CREATE TABLE ASSIGNMENT (
ASSIGN_NUM CHAR(3),
ASSIGN_DATE DATE,
PROJ_NUM CHAR(3),
EMP_NUM CHAR(3),
ASSIGN_JOB CHAR(4),
ASSIGN_CHR_HR NUMBER(8,2),
ASSIGN_HOUR NUMBER(8,2),
ASSIGN_CHARGE NUMBER(8,2));
DESCRIBE ASSIGNMENT
INSERT INTO ASSIGNMENT VALUES ('1001','20-MAR-2006','18','103','503','84.50','3.5','295.75';
Upvotes: 0
Views: 41154
Reputation: 1
try this as you can't insert quotes in numbers:
INSERT INTO ASSIGNMENT VALUES ('1001',TO_DATE('20-MAR-2006','DD-MON-YYYY'),'18','103','503',84.50,3.5,295.75);
Upvotes: -1
Reputation: 18600
You missed right parenthisis
at end of query.
INSERT INTO ASSIGNMENT VALUES (
'1001','20-MAR-2006','18','103','503','84.50','3.5','295.75';
^^^^^
Here you missing )
Upvotes: 4
Reputation: 11
Try this insert:
INSERT INTO ASSIGNMENT VALUES ('1001',TO_DATE('20-MAR-2006','DD-MON-YYYY'),'18','103','503','84.50','3.5','295.75');
Upvotes: 1
Reputation: 310
Looks like you are missing a closing parenthesis at the end of the INSERT statement:
INSERT INTO ASSIGNMENT VALUES ('1001','20-MAR-2006','18','103','503','84.50','3.5','295.75');
Upvotes: 6