-->
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: Help with convert SQL to Criteria query
PostPosted: Fri Jun 15, 2012 5:45 am 
Newbie

Joined: Fri Jun 15, 2012 3:59 am
Posts: 1
Hello.
Can you help me convert SQL script to Criteria or HQL
Code:
SELECT * FROM Companies c
WHERE c.Premium = 1
ORDER BY (SELECT COUNT(*) FROM ArticlesAuditing a
WHERE SourceId in (Select Id from CompaniesSources cc
where  cc.CompanyId = c.CompanyId)) DESC


For ASP.NET MVC project.
Thanks


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.