-->
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: Query problem
PostPosted: Sun Jan 08, 2012 1:11 pm 
Newbie

Joined: Sat Jul 16, 2011 4:15 pm
Posts: 3
Hello,

In MySql I have this query:
Code:
SELECT
    PREF_RESPONSAVEL,
    SUM(CASE STATUS_ATUAL WHEN 1 THEN 1 ELSE 0 END) AS Pendentes,
    SUM(CASE STATUS_ATUAL WHEN 99 THEN 1 ELSE 0 END) AS Concluidos
FROM tb_levantamentos
GROUP BY PREF_RESPONSAVEL


How can I do this query using hibernate?
Is this possible to use the API Criteria to do this query?

Thank you!


Top
 Profile  
 
 Post subject: Re: Query problem
PostPosted: Tue Jan 10, 2012 12:32 pm 
Newbie

Joined: Sat Jul 16, 2011 4:15 pm
Posts: 3
Someone, please?


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.