insert into values  where 这种语法错误

解决方案 »

  1.   

    insert into exlistelec201412 VALUES(20994,2,
            '2014-12-04 13:33:27',
            1,'川EF3316',12556,201,
            '2014-12-04 16:56:25',
            1,'川EF3316',8,'',
            0,0,1,
            '2014-12-04 17:16:06',
            '2014-12-04 23:54:10')
    错误报告 -
    SQL 错误: ORA-01861: literal does not match format string
    01861. 00000 -  "literal does not match format string"
    *Cause:    Literals in the input must be the same length as literals in
               the format string (with the exception of leading whitespace).  If the
               "FX" modifier has been toggled on, the literal must match exactly,
               with no extra whitespace.
    *Action:   Correct the format string to match the literal.出错的sql 就在上面,时间,char我都加''了的。。还有哪里错了呢?
      

  2.   

    你的字段是字符型还是日期型?如果是日期型的话,统一把时间改为下面这样
    to_date('2014-12-04 23:54:10','yyyy-mm-dd hh24:mi:ss')
      

  3.   

    dbms_output.put_line(str)将组装好的SQL打印出来,看看语法哪里有问题