-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with createSQLQuery and sum(x*y)
PostPosted: Sun Feb 03, 2008 12:06 pm 
Newbie

Joined: Sat Dec 22, 2007 2:26 pm
Posts: 3
Hello!
I have a strage problem:

Code:
query = "select sum(amount*pricePerPiece), sum(amount) from ForecastValues";
         result = sess.createSQLQuery(query).list();


The columns sum(amount * pricePerPiece) and sum(amount) are completely identical! When I run that query directly on the Database, the result is correct.

any ideas?

Thanks a lot,

Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.