oracle運算式之“ora-0079”不是group by運算式分析(未完待續。。。)__oracle

來源:互聯網
上載者:User
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進行拼串。但是這個問題解決不了是心中的一塊結啊。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.