Bug 11067251 False ORA-979 with TRUNC(date, format) or ROUND(date, format) - superceded
Description
when expression like trunc(date, format) or round(date, format) appears in
group by list, the group by is in an inline view query block, an ORA-00979
may be raised if the format is different even when it means the same.
Ex.
SQL> select *
from ( select TRUNC(HIREDATE,'MM')
from EMP
group by TRUNC(HIREDATE,'mm')); 2 3 4
from ( select TRUNC(HIREDATE,'MM')
*
ERROR at line 2:
ORA-00979: not a GROUP BY expression
Workaround
- no_merge hint
- _simple_view_merging=false
Partager