有几个地方没有写详细
应为
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 关联
应为
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 关联
解决方案 »
- CASE a when 1 then 'A'报错求解。Orz OLing
- 数据库链接测试
- 求oracle的分析[监听]工具
- FROM keyword not found where expected
- shmmax 的这句话要怎么理解!
- 谁能用大白话说一下这个是什么意思?
- 数据检索问题,,100分相送!!!!!!!!!!!!
- 在往数据库插入数据的时候,oracle自动会停掉服务,报错:“ORA-03113: end-of-file on communication channel ”
- 存储过程中,动态sql创建view的问题
- 如何得到8列中第X个不为空的列对应的值(X>1)
- ASP+ORACLE存储过程急救中。
- 如何在数据库的环境中执行存储过程?
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
update tfNodeInstance set TimeOut=1 where TimeOut = 0 and (instanceid,nodeid) in ( select instanceid,nodeid from tfActionInstance where Totime<sysdate and tfActionInstance.State='m')