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

Home -> Community -> Usenet -> c.d.o.misc -> Re: what wrong with this statement?

Re: what wrong with this statement?

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 15 Mar 2006 20:42:10 +0100
Message-ID: <dv9qmi$4i1$1@nntp.fujitsu-siemens.com>


Nick schrieb:
> when i input the following statement error occur:
> select pubid,pubname,TITLE from (publisher natural inner join journal)
> group by (pubid) having count(pubid)>1;
>
>
>
> error:
> select pubid,pubname,TITLE from (publisher natural inner join journal)
> group by (pubid) having count(pubid)>1
> *
> ERROR at line 1:
> ORA-00979: not a GROUP BY expression

pubname and title are not part of the group by expression, so oracle assumes that they differ within the group. Therefore it can't figure out which values to put into the one result row per group.

Lots of Greetings!
Volker Received on Wed Mar 15 2006 - 13:42:10 CST

Original text of this message

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