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