Error messageORA-00979: not GROUP BY expression
From: Bernard Stibbe (bstibbe_at_aegon.nl)
Date: 10/29/03
- Next message: Wojciech Szymkiewicz: "Re: Real ADOConnection.Close"
- Previous message: George Christoforakis: "Re: Empty table problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Oct 2003 04:25:34 -0800
Hello users.
I'm writing an application on a Oracle 8 database in combi with the
ADO component. The OLE DB provider is Microsoft for Oracle.
I'm trying to get a report that display some info.
This is the command SQL in ADOQuery
==========
SELECT c.CONTRACT_NR CONTRACT, t.code_WD CODE_WD,
FROM CONTRACT_T c, TARIEFLAAG_OVK_T t
WHERE (c.bu = decode(:BU, 'PA','1', 'BP', '2')
AND (c.CONTRACT_NR = t.CONTRACT_NR)
GROUP BY c.CONTRACT_NR, t.CODE_WD
=====
The parameter is a string 'PA'or 'BP'.
When I assign a value for the paramenter and run this command,
ADO or ORACLE (!) returns me 'ORA-00979: not GROUP BY expression.'
When I replace manually the parameter :BU to a string in SQL without
any parameters, this command runs well. If I don't use the GROUP BY
function it works also well ?
What is the reason of the error message and how can you fix this.
Regards,
Bernard
- Next message: Wojciech Szymkiewicz: "Re: Real ADOConnection.Close"
- Previous message: George Christoforakis: "Re: Empty table problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|