达梦8执行update select 语句报错,这个sql放到另外一个达梦8的数据库就能执行,麻烦看下什么原因呢, 还有就是想问下update select语句是从 哪个版本开始支持的呢
update "COMPUTE_RESOURCE_USED_RATION" a,
(select used_ratio_type,min(collect_time) min_collect,avg(used_ratio) avg_used from "COMPUTE_RESOURCE_USED_RATION"
group by used_ratio_type,to_char(collect_time,'YYYY-MM')) b
set a.used_ratio =b.avg_used
where a.used_ratio_type= b.used_ratio_type
and a.collect_time=b.min_collect;
SQL> update T_A t1, (select C1, count(*) from T_B group by c1 having count(*) > 1) t2 set t1.C4=t2.C1 where t1.C1=t2.C1; 影响行数 512
这个形式的语法是支持的,执行这个看看语法报错的版本号: