错误:ORA-00911:无效字符

时间:2016-12-07 11:19:11

标签: sql oracle visual-studio oracle11g

这是从TOAD运行完美时的查询,但是当我从Visual Studio运行时给出错误'ORA-00911:无效字符'。这就是我查询的方式:

INSERT into TRB (ID, ID_REF, DATE, STATUS, INSERT_DATE,
                           ID_DD_REF, USER, VERIFY_DATE, VERIFY_USER) 

select 11, 337470,
       to_date('22.11.2016','DD.MM.YYYY'),
       'O',
       CAST(TO_TIMESTAMP('2016-11-22 14:28:24.260','YYYY-MM-DD HH24:MI:SS.FF9') AS DATE),
       8552,
       'test',
       NVL(CAST(TO_TIMESTAMP('','YYYY-MM-DD HH24:MI:SS.FF9') AS DATE),''),
       '' from dual  
WHERE NOT EXISTS (SELECT ID FROM TRB WHERE ID = 11);

1 个答案:

答案 0 :(得分:4)

尝试删除分号;在末尾。

另外,请看这个问题:Where's my invalid character (ORA-00911)