-->
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.  [ 2 posts ] 
Author Message
 Post subject: How to make so hql "group by" datetime type in one
PostPosted: Mon Jan 09, 2006 3:26 am 
Newbie

Joined: Mon Jan 09, 2006 3:08 am
Posts: 1
Hibernate version:nh1.01

my hql is :
Code:
select min(obj.value),max(obj.value),avg(obj.value),count(obj.id),obj.starttime,obj.item,obj.stcode,obj.pcode from Qa3 as obj group by obj.starttime,obj.item,obj.stcode,obj.pcode

here ,it can right run;
but now,i query a day data ,example native sql for oracle :
Code:
select count(id),max(value),min(value),avg(value),stcode,pcode,item,to_char(starttime,'yyyymmdd') from qa3 group by stcode,pcode,item,to_char(starttime,'yyyymmdd')


i don't know ,can nh sustain this?

thanks ! wait for you..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 09, 2006 7:37 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, it should work, try it.


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

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.