有几个地方没有写详细
应为
update tfNodeInstance set TimeOut=1 from tfNodeInstance,tfActionInstance where tfActionInstance .Totime<sysdate and tfActionInstance.State='m'and tfNodeInstance.InstanceID = tfActionInstance.InstanceID and tfNodeInstance.NodeId = tfActionInstance.NodeId and TimeOut = 0tfActionInstance 和 tfActionInstance 两个表 通过InstanceID 和NodeId 关联

解决方案 »

  1.   

    update tfNodeInstance 
    set TimeOut = 
    decode(
    (select count(*) from tfActionInstance 
    where tfActionInstance.InstanceID = tfNodeInstance.InstanceID 
    and tfActionInstance.NodeId =tfNodeInstance.NodeId  
    and tfActionInstance.Totime < sysdate 
    and tfActionInstance.State='m' 
    ),0,TimeOut ,1)
    where TimeOut = 0
      

  2.   

    ORACEL中是有很多不方便.Croatia(Croatia)的语句强
      

  3.   

    其实,我更加喜欢oracle,赫赫,献丑了。
      

  4.   

    问题已经解决,如下
    update tfNodeInstance set TimeOut=1 where  TimeOut = 0 and (instanceid,nodeid) in ( select instanceid,nodeid from tfActionInstance where Totime<sysdate and tfActionInstance.State='m')