Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00979: not a GROUP BY expression - can someone help?

Re: ORA-00979: not a GROUP BY expression - can someone help?

From: sybrandb <sybrandb_at_gmail.com>
Date: 3 Jan 2007 21:58:26 -0800
Message-ID: <1167890305.435621.258880@11g2000cwr.googlegroups.com>

Mohd Al Junaibi wrote:
> Hello all,
>
> I'm receiving a ORA-00979 (NOT A GROUP BY Expression) error when I try
> to run the below statement:
>
>
> SELECT APPLICATIONAUTH.APP, APPLICATIONAUTH.GROUPNAME,
>
> ( sum(decode(optionname,'READ',1,'INSERT',3,'DELETE',5,'SAVE',7) ) )
> As authCalc,
>
> MAXAPPS.DESCRIPTION
> FROM APPLICATIONAUTH, MAXAPPS
> WHERE APPLICATIONAUTH.APP = MAXAPPS.APP
> GROUP BY APPLICATIONAUTH.APP, APPLICATIONAUTH.GROUPNAME
>
> Can someone help me? I'm new to Oracle, and I think it is a silly
> mistake.

every expression not including SUM, AVG, MIN, MAX etc needs to be in the GROUP BY list.
You're missing one.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Wed Jan 03 2007 - 23:58:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US