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 -> How to cope with Oracle's bad mood

How to cope with Oracle's bad mood

From: Rick Denoire <100.17706_at_germanynet.de>
Date: Mon, 08 Dec 2003 23:30:23 +0100
Message-ID: <fss9tv4nkpkh44olc3o8uiauqq0cetgq8s@4ax.com>


A developer came to me today to ask me what I changed in the DB because one of his queries (which runs fine otherwise) is being suddenly rejected by Oracle, giving "ORA-00979: Not a group by expression" error:

select to_char(last_on, 'IW') week,

        round(avg(elapsed),2) mean
from dims_overload.dr_cola
where elapsed < 1000
group by to_char(last_on, 'IW')
order by to_char(last_on, 'IW');

(last_on is a date). Executing the query on a second test DB works
(containing similar data); removing the "order by" renders the query
syntactically correct, from Oracle's point of view.

This seems to be some kind of Oracle idiosyncracy, and yes, I did changed something in the DB, namely I set CURSOR_SHARING=force, but I can't imagine this would be the cause.

In any case, sql_tracing is useless (since the query is not executed at all). How can I analyze what is happening in such a case? How can I dig into it? The problem could be too trivial in order to make a TAR out of it.

Any clou?

Rick Denoire Received on Mon Dec 08 2003 - 16:30:23 CST

Original text of this message

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