Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 oracle 11g 上使用以下内容:
select sum(ora_hash(distinct attribute) from table;
这给了我错误:ORA-00936:“缺少表达式”
我期待这能起作用,例如表中的 sum(distinct attribute); 工作正常。
有什么建议吗?
这似乎是一个奇怪的结构。我会推荐:
select sum(distinct ora_hash(attribute) from table;
(尽管sum(distinct)几乎从来都不是正确的构造。)
sum(distinct)
或者:
select sum(ora_hash(attribute)) from (select distinct attribute from table) t;