我得到了这个在 Oracle 中有效的声明:
update table a set
a.attribute =
(select
round(sum(r.attribute1),4)
from table2 p, table3 r
where 1 = 1
and some joins
)
where 1 = 1
and a.attribute3 > 10
;
现在我想在 Exasol DB 中做同样的声明。但我收到错误 [代码:0,SQL 状态:0A000] 不支持功能:这种相关子选择(会话:1665921074538906818)
经过一番研究,我发现您需要使用以下语法编写查询:
UPDATE table a
set a.attribute = r.attribute2
FROM table a, table2 p, table3 r
where 1 = 1
and some joins
and a.attribute3 > 10;
问题是我不能取 r.attribute2 的总和。所以我得到一组不稳定的行。有什么方法可以在 Exasol DB 中进行第一次查询?
谢谢你们的帮助!