Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00979 - Not a group by expression in 12c

user588690Nov 12 2015 — edited Nov 12 2015

Recently our database upgraded from 11g to 12c and one of the query isnt working which includes group by

SELECT RTRIM(LTRIM(SUBSTR(account_number,4,4))) COMPANY,

      RTRIM(LTRIM(debit_amt)) debit_amt,

       RTRIM(LTRIM(credit_amt)) credit_amt

FROM   table a

WHERE a.post_flag = 'C'

GROUP BY RTRIM(LTRIM(SUBSTR(account_number,4,4)

ORDER BY RTRIM(LTRIM(SUSBTR(account_number,4,4);

The above query was working in 11G..but in 12c upon executing we are getting ORA-00979..Any idea how to overcome it?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2015
Added on Nov 12 2015
4 comments
651 views