ORA-979:Not A Group By Expression With CURSOR_SHARING=Similar Or Force (Doc ID 1081548.1)

Last updated on JUNE 01, 2017

Applies to:

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

Symptoms

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,
i.e.
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'))

       

Changes

Cursor_sharing parameter set to similar or force

Cause

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