Re: Error messageORA-00979: not GROUP BY expression

From: Michael Jacobs (iq193_at_earthlink.net)
Date: 11/05/03


Date: Tue, 4 Nov 2003 19:41:52 -0500

Hello,

  are you setting the parameter type for :bu bind variable?

regards,

Michael

"Bernard Stibbe" <bernard@bstibbe.demon.nl> wrote in message
news:3fa6bd80@newsgroups.borland.com...
> Hello users.
>
> I'm writing an application on a Oracle 8 database in combi with the
> ADO components. 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 c, TARIEFLAAG 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 will be a string 'PA'or 'BP'.
> When I assign a value for the paramenter and run the sql statement,
> Oracle returns the message 'ORA-00979: not GROUP BY expression.'
>
> When I replace manually the parameter :BU to a string in the sql statement
> without any parameters, the statement runs well. If I don't use the GROUP
BY
> function but with the parameter, it works also well ?
>
> What is the reason of the error message and how can you fix this.
>
> Any help is helpfull.
>
>
> Regards,
>
>
> Bernard S
>
>



Relevant Pages

  • Re: CBO & different execution plans
    ... a SQL statement in a packaged application that was taking excessively ... long to execute - roughly 3.4 seconds per execution and the packaged ... The problem in this case had to do with Oracle picking ... Providing a hint to Oracle to use ...
    (comp.databases.oracle.server)
  • Re: DBD::Oracle installation - make test failed - ORA-28000: accout locked
    ... tests so no more complaints about the wrong return values from exit. ... But the test 20 and 21 still failed, the errors seem to be Oracle ... SQL statement ... Subject: DBD::Oracle installation - make test failed - ORA-28000: accout ...
    (perl.dbi.users)
  • Re: formula help please
    ... primary and foreign keys are essentials in solving such problems. ... each of the tables are related to each other with each SQL statement. ... engine like Oracle), the program adds additional lines to the actual ... WHERE clause that describes how the tables are to be linked together. ...
    (comp.databases.oracle.misc)
  • Re: SELECT statement efficiency question
    ... Keep in mind that Oracle may transform your SQL statement into another ... suppose on-the-fly compiling of the PL/SQL code if not using Native ...
    (comp.databases.oracle.server)
  • Re: Oracle jdbc perf on linux and windows
    ... >> an Oracle configuration problem. ... particular SQL statement as well on Linux as it does on Windows/MacOS? ... What driver are you using? ...
    (comp.lang.java.programmer)

Loading