oracle表达式之“ora-0079”不是group by表达式分析(未完待续。。。)
2017-09-05 20:17
489 查看
with tab as (select t.object_pid, t.mesh, round(x, 8) x, round(y, 8) y, round(z, 3) z, id from had_object_box_pole t, table(sdo_util.GetVertices(t.geometry)) g), tab1 as (select t.object_pid, t.mesh, t.x, t.y, t.z, t.id, count(*) over(partition by t.object_pid, t.x, t.y, t.z) num, row_number() over(partition by t.object_pid, t.x, t.y, t.z order by t.id) sq from tab t where t.id > 1), tab2 as (select t.object_pid, t.mesh, t.x, t.y, t.z, t.id, t.num, t.sq, (t.x || ',' || t.y || ',' || t.z) str from tab1 t where num > 1), tab3 as (select object_pid, t.id, mesh, substr(sys_connect_by_path(str,'|'),2) strVal, wm_concat(t.id) strid from tab2 t where connect_by_isleaf = 1 start with sq = 1 connect by sq = PRIOR sq + 1 and object_pid = PRIOR object_pid and sq < =(select max(sq) from tab2) group by object_pid,t.id,mesh)select * from tab3 t3在进行数据库操作时,进行tab3的选取时出现如题的错误,起初按照网上说的在select 列表项中出现的列必须出现在group by后面(聚合函数除外),但是不能正确,找到的替代件决办法还是采用substr(sys_connect_by_path)将id进行拼串。但是这个问题解决不了是心中的一块结啊。
相关文章推荐
- Oracle查询错误分析:ORA-01791:不是SELECTed表达式
- Oracle 之 “ORA-00979:不是GROUP BY 表达式”
- Oracle 之 “ORA-00979:不是GROUP BY 表达式”
- 在oracle里报错:ORA-00979: 不是 GROUP BY 表达式
- 关于Oracle报错ORA-00979不是GROUP BY表达式
- 关于Oracle报错ORA-00979不是GROUP BY表达式
- Oracle查询错误分析:ORA-01791:不是SELECTed表达式
- Oracle出现不是group by 表达式的原因
- 关于ORA-00979 不是 GROUP BY 表达式错误的解释
- Oracle:Ora-01791 不是Selected表达式
- Oracle查询错误分析:ORA-01791:不是SELECTed表达式
- oracle问题收录:ORA-01791: 不是 SELECTed 表达式
- ORACLE查询中出现“Ora-01791 不是Selected表达式”错误信息的解决办法
- Oracle查询错误分析:ORA-01791:不是SELECTed表达式
- ORA-00979 不是 GROUP BY 表达式错误的解释
- Oracle查询错误分析:ORA-01791:不是SELECTed表达式
- 关于ORA-00979 不是 GROUP BY 表达式错误的解释
- oracle报错:不是GROUP BY 表达式
- sql:ORA-00979:不是GROUP BY 表达式
- [转]关于ORA-00979 不是 GROUP BY 表达式错误的解释