-->
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: Working with running subtotals and grandtotal
PostPosted: Tue Jan 22, 2008 6:04 am 
Newbie

Joined: Tue Jan 22, 2008 5:42 am
Posts: 1
Does hibernate support limit and with rollup clause?

This is my Query to calculate subtotals & grand total that should result as following


TypeOfWork DeptId TotalDuration SubTotal

1 4 01:15:00 01:15:00
2 3 02:15:00 02:15:00
3 4 01:00:00 01:00:00
4 6 02:15:00
4 3 02:00:00 04:15:00
08:45:00

Query:

select typeofwork,deptid,total_duration,SEC_TO_TIME( SUM( TIME_TO_SEC( total_duration ) ) ) as subtotal from issuetracker.requeststateprocessor r group by typeofwork,deptid with rollup;

But it gives the following exception

org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: with near line 1, column 139

It seems that hibernate does not support with rollup clause.. Is there anyother relevant clauses available or how could i alter that in hibernate..

Thanks in advance


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.