The query is correct but jdbc modify it !!

my query is
SELECT o.ID_pagamento, SUM (m.valore) FROM operazioni o, movimenti_magazzino m WHERE m.ID_operazioni = o.ID AND m.quantita < 0 GROUP BY o.ID_pagamento
but jdbc automatically executes a second query:
SELECT COUNT(*), O.ID_PAGAMENTO, SUM (M.VALORE) FROM OPERAZIONI O, MOVIMENTI_MAGAZZINO M WHERE M.ID_OPERAZIONI = O.ID AND M.QUANTITA < 0
without the "GROUP BY" the query is wrong
what can I do?
(I use jdk 1.3)

huh?
So the only thing that you are doing is the first query. You are not creating the second one nor are you using a 3rd party library that creates it.
Then it has nothing to do with your first query. And so it doesn't matter whether it is wrong or not.
Now it could be that you are doing something in your java code that causes this. For example trying 'count' the number of rows returned by using 'last'. If so it suggests there is a bug in the driver.
But that doesn't matter. Obviously doing its own query. So you are saving nothing by using the last() method. So you might as well do the query yourself and do it correctly.

Similar Messages

Maybe you are looking for

  • How to make the query in one single query? No Union please....

    Hi, I have sets of around 18 queries which is finding counts in many scenarios. I wanted to have a single query for this. which diplays the result in a single row.Is there a way , I heared analytical functions are good options ,but I am new to Oracle

  • First Time Install Question...

    So, I'm using Fusion to run Vista, but I find it's a bit slow, and I'd like to use BootCamp. If I run the BootCamp agent, will it format the OS X partition, or will it remain intact? Thanks!

  • Boot from san in solaris 11

    Hi, Thanks in advance. I have a solaris 11 set up with SPARC(sunfire v-250). I wanted to set up a boot from san environment in Solaris 11. 1) In solaris 10 I used to do set up using ufsdump command and the further steps. Now in solaris 11 the command

  • Problem for XSL copying  XML file with Error in expression '*|/'.

    Hi, I am trying to convert xml file to another xml through command-line interface but failed. java oracle.xml.parser.v2.oraxsl data.xml data.xsl data_new.xml My sample xml and xsl files are: 1. XML file <employee_data> <employee_row> <employee_number

  • Business process engine, Integration engine, and Adapter engine

    can you differentiate Business process engine(BPE), Integration engine (IE), and Adapter engine