結構上沒有什么問題,不能將commit放到循環體里面。否則出錯。
檢查你的update語句是否寫得正確(主要是where字句)

解决方案 »

  1.   

    select * from current_temp where to_char(coltime,'hh24 miss') = str_t2||str_t and (phase = 'B' or phase = 'b');这样查询是否有值?搞清楚to_char(coltime,'hh24 miss') = str_t2||str_t是否相等
    修改:
    to_char(coltime,'hh24miss') = str_t2||str_t
      

  2.   

    commit 是没有问题的,一个事物里面的
    建议你 插入数据以后先select 调试 看看update选没有选出 结果集
      

  3.   

    没有符合条件的记录供语句更新,过滤条件过滤掉了,找一些确定的值直接写在where条件后试试看
      

  4.   

    我在sqlplus里面运行
    update current_temp set colhour = to_number('10', '99')
        where to_char(coltime,'hh24 miss') = '10 2356'
          and (phase = 'A' or phase = 'a');
    是没有问题的,有结果!
    但是在这么过程里面没有值,也不报错!