Professional Documents
Culture Documents
Oracle - Error at Command Line - 1 Column - 698 Error Report - SQL Error - ORA-00984 - Column Not Allowed Here - Stack Overflow
Oracle - Error at Command Line - 1 Column - 698 Error Report - SQL Error - ORA-00984 - Column Not Allowed Here - Stack Overflow
INSERT INTO
FLAG ("OPT_FLAG_KEY","H_KEY","FIRST_NAME","LAST_NAME",
"MIDDLE_NAME","TITLE","CREDENTIALS","ADDRESS_LINE_1",
0 "ADDRESS_LINE_2","ADDRESS_LINE_3","CITY","STATE",
"POSTAL_CODE","PHONE_NUMBER","BUSIN_PHONE","DECEASED",
"OPT_FLAG","OPT_FLAG_DATE","SOU_KEY","SOU_FILE_ID",
"SOU_FILE_ID_TEXT","BAT_ID","PHONE_NUMBER_SOURCE","BIRTH_DATE")
VALUES(37009326,4,'Daniel','Boyle',NULL,NULL,NULL,'368 Road',
NULL,NULL,'Doylown','BVBV',1801,NULL,NULL,'NO','OUT',
TO_CHAR('10-AUG-16','DD/MM/YYYY'),201,
TO_DATE(SUBSTR('vhic_pavir_20160810.txt',12,8),YYYYMMDD),
'2016-08-10',598441,NULL,TO_DATE('03-FEB-1952',DD-MM-YYYY));
oracle
Share Improve this question Follow edited Aug 29, 2016 at 18:58 asked Aug 29, 2016 at 18:38
Kenster PANDIA LAKSHMANAN
23.7k 22 82 106 27 2 6
1 can you provide desc table (using desc table_name command) ? – Abhishek Aug 29, 2016 at 18:39
i cannot give it for all the column here, i have pasted in my answer@abhishek – PANDIA LAKSHMANAN Aug 29,
2016 at 18:43
I don't expect a ORA-00984 error for that reason, but the column names should go without quotes, i.e. INSERT
INTO FLAG (OPT_FLAG_KEY, H_KEY, FIRST_NAME, LAST_NAME, MIDDLE_NAME, TITLE, CREDENTIALS,
ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, CITY, STATE etc Hope it helps. – lrnzcig Aug 29, 2016 at
19:20
There are several issue with your statement. First, double-quotes are not required on column names
(unless you have mixed cases or space), remove them.
1
TO_CHAR('10-AUG-16','DD/MM/YYYY') -> 10-AUG-16 is a string, not a date. Thus it does not make any
sense to convert a string to a string
'2016-08-10' -> do you like to insert a DATE value or a string? You provided a string, not a date.
Share Improve this answer Follow answered Aug 29, 2016 at 20:43
Wernfried Domscheit
55.2k 9 78 114