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