这是从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);