17,377
社区成员
发帖
与我相关
我的任务
分享
merge into t_records n
using (select * from t_records where terminal_version = tv2) o
on (n.result <> o.result
and n.item_id = o.item_id
and nvl(n.refer,1) = nvl(o.refer,1)
and n.terminal_id = o.terminal_id
and n.terminal_id = tid
and n.terminal_version = tversion)
when matched then
update set n.result = o.result
,n.description= o.description
,n.owner = o.owner;