SQL Language (MOSC)

MOSC Banner

ORA-00979 in some select in 12c(and later) database

edited Sep 19, 2020 5:00AM in SQL Language (MOSC) 1 commentAnswered

What is wrong with this select:that generating ORA-00979:

  SELECT x.f1

    FROM (    SELECT 1 f3, q.f_1 f1, q.f_1 f2

                FROM (SELECT o.f_1, o.f_2

                        FROM t_test o

                       WHERE o.f_1 = 1) q

          CONNECT BY PRIOR q.f_1 = q.f_2

          START WITH q.f_1 = 1) x

   WHERE x.f1 = x.f2

GROUP BY x.f1, x.f3;

when I've change condition for example : WHERE x.f1 >= x.f2 there is no errors.

In database 11.2 there was no errors as well.

Sample table:

CREATE TABLE t_test (  f_1 number,  f_2 number);

Regards,

Lesław

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center