ORA-979:Not A Group By Expression With CURSOR_SHARING=Similar Or Force

(Doc ID 1081548.1)

Last updated on AUGUST 25, 2017

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


ORA-979: not a GROUP BY expression with CURSOR_SHARING=similar or force.

With CURSOR_SHARING=exact, the query works. 
Errorstack is similar to
 kgesev <- kgesec0 <- qcuErroer <- qcuErroep <- erroep <- qecgoc <- qecsel <- qecpqbcheck <- qecdrv <- qecdrv  <- kkqcttcalo <- kkqctdrvIT <- apadrv <- opitca
The failing query has GROUP BY clause which contains expressions involving literals,
group by decode(conv2.fndiatarif, 0, to_date(tari2.dat_movimento,
'DD/MM/YY'), to_date('01/'||to_char(tari2.dat_movimento, 'MM/YY'),'DD/MM/YY'))



Cursor_sharing parameter set to similar or force


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms