Error messageORA-00979: not GROUP BY expression

From: Bernard Stibbe (bstibbe_at_aegon.nl)
Date: 10/29/03


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



Relevant Pages

  • Re: Program with parameters in VC7
    ... I know about command line parameters....But thats not what I am looking for.... ... The parameter is coming in from an oracle form.... ... i have to pass the oracle form parameter to the function... ... >> Oracle forms will pass a string to the C program which will return the ...
    (microsoft.public.vc.ide_general)
  • Re: SQL Server 2005 Common Table Expression
    ... I'm not entirely sure that I agree on the coolness factor - frankly I think ... they're a bit of a hack (e.g. compared to Oracle). ... When using *any* ADO component from D2006/W32, however, the error ...
    (borland.public.delphi.database.ado)
  • Re: Creating a table while loading data into it - possible?
    ... Is it possible to do the same thing with one command for Oracle? ... Sounds like this should be the basis of the solution. ... all parts of the SQL string have to be string values or be converted to ...
    (comp.databases.oracle.server)
  • Re: Query Oracle from Excel
    ... You will need the Oracle client sofware installed on the PC you're running ... What exactly is DBDataProvider and DBDataSource? ... Global prmUsername As String ... Dim adoConn As New ADODB.Connection ...
    (microsoft.public.excel.programming)
  • SUMMARY: sudo version 1.6.7p5 : using -H -u options on Solaris 8
    ... Many thanks to those that responded, as expected all responses were helpful. ... This will allow you to do the thing that the user oracle requires while also ... designated in the sudoers file who requires to use the command, ... there is a CLASSPATH variable set which, as the oracle user I can see by ...
    (SunManagers)