insert into excp_day t (t.code,t.time) values ('aaa',Double.parseDouble('234.56'))

解决方案 »

  1.   

    insert into excp_day t (t.code,t.time) 
    select 'aaa',Double.parseDouble('234.56') from dual;
      

  2.   

    insert into excp_day (code,time) values ('aaa',Double.parseDouble('234.56'))
    这样行不? 
    Time 与  Double 数据类型对吗?
      

  3.   

    为啥要这样写呢?Double.parseDouble里要跟个string的数组,还能这样写吗?String str_w={'xxxx','234.56'};insert into excp_day t (t.code,t.time) 
    select str_w[0],Double.parseDouble(str_w[1]) from dual;
      

  4.   

    报错还是没有结果?
    没有commit;
      

  5.   

    String str_w={'xxxx','234.56'};String sql = "insert into excp_day t (t.code,t.time) 
    select str_w[0],Double.parseDouble(str_w[1]) from dual;"rs = stmt.executeQuery(sql);
    这是在java里写的,下面这样写是可以插值的,改成parseDouble和string数组的格式,就不行了。String sql = "insert into excp_day t (t.code,t.time) values ('aaa',234.56)";time在oracle里是number(10,4)这个类型的