Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00979: not a group by expression

143894Nov 7 2008 — edited Nov 8 2008
I am using Jasper Reports with Oracle 10g at the back. When I write the following query it gives ORA-00979: not a group by expression
SELECT 
       DECODE($P{P_CHOICE}, 'A',  JD.JOURNAL_ID, NULL) ABC,
       SUM(JD.DEBIT) DEBIT, SUM(JD.CREDIT) CREDIT
FROM   JOURNALS_DETAILS JD
GROUP BY DECODE($P{P_CHOICE}, 'A',  JD.JOURNAL_ID, NULL)
I tried to ask the same question at Jasper's forum but got no reply. Can someone help me.

What I feel is the Parameters ($P) within Decode is passed to Oracle in some incorrect manner. Is there any way that I can find out how the query is received by Oracle since the parameter format of Jasper is not that's used by Oracle. I checked v$sql but this query was not there probably it was not parsed.

Any help will be much appreciated.

ZRH
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2008
Added on Nov 7 2008
4 comments
1,945 views