ORA-00917缺少逗号,但它不缺少?

时间:2015-10-14 13:59:58

标签: oracle database-administration ora-00917

做了一些Oracle DBA作业,我看了几篇关于00917错误的帖子,但我只是做了一个简单的INSERT。我似乎无法看到我在哪里错过逗号或括号。有什么帮助吗?

bar* b = reinterpret_cast<bar*>(f)

3 个答案:

答案 0 :(得分:2)

不要在列列表中使用函数调用:

INSERT INTO copy_f_orders(ORDER_NUMBER, ORDER_DATE, ORDER_TOTAL, CUST_ID, STAFF_ID)
VALUES (5691, '09-23-2004', 145.98, 225, 12);

如果您需要在值中调用它:

INSERT INTO copy_f_orders(ORDER_NUMBER, ORDER_DATE, ORDER_TOTAL, CUST_ID, STAFF_ID)
VALUES (5691, TO_DATE('09-23-2004', 'mm-dd-RRRR'), 145.98, 225, 12);

答案 1 :(得分:1)

INSERT INTO copy_f_orders 
(ORDER_NUMBER, TO_DATE(ORDER_DATE, 'mm-dd-RRRR'), ORDER_TOTAL, CUST_ID, STAFF_ID)
VALUES (5691, '09-23-2004', 145.98, 225, 12);

应该是

INSERT INTO copy_f_orders 
(ORDER_NUMBER, ORDER_DATE, ORDER_TOTAL, CUST_ID, STAFF_ID)
VALUES (5691, TO_DATE('09-23-2004', 'mm-dd-RRRR'), 145.98, 225, 12);

在列上使用TO_DATE函数没有意义,希望它有意义。

答案 2 :(得分:-1)

("INSERT INTO copy_f_orders 
(ORDER_NUMBER, TO_DATE(ORDER_DATE, 'mm-dd-RRRR'), ORDER_TOTAL, CUST_ID, STAFF_ID)
VALUES (5691, '09-23-2004', 145.98, 225, 12)");