ORA-30485: missing ORDER BY expression in the window specification
Cause: Either the ORDER BY expression is mandatory for this function, or there is an aggregation group without any ORDER by expression.
Action: None
ORA-30485错误是由窗口规范中缺少ORDER BY表达式引起的。
ORA-30485错误指示ORDER BY子句采用的窗口描述符,但窗口描述符中没有指定ORDER BY子句。要解决此错误,必须修复SELECT语句中表示排序顺序的窗口规范中的ORDER BY语句。
下面的查询语句中存在ORA-30485错误:
SELECT name, RANK() OVER (PARTITION BY dept_id)
FROM employees
WHERE salary > 10000;
正确处理:
要解决此错误,可以修复SELECT语句中表示排序顺序的窗口规范中的ORDER BY子句,即:
SELECT name, RANK() OVER (PARTITION BY dept_id ORDER BY salary)
FROM employees
WHERE salary > 10000;
本文标签:ORA-30485 missing ORDER BY expression in the window specification
原文链接:
版权说明: 本文由作者上传,本站仅提供存储服务,转载请注明原文链接