-->
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: Support for count(1) cluase in HQL
PostPosted: Thu Jul 27, 2006 1:07 am 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
Need some information regarding a support for following syntax in HQL

when I run following query in SQL it works

select count(1) from tablename;


when I run following query using HQL it doesnt work

select count(1) from tableobj;

any clue whether above is supported in HQL, if not what is the alternative ?

thanks and regards

sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 27, 2006 9:06 am 
Expert
Expert

Joined: Tue Apr 25, 2006 12:04 pm
Posts: 260
try to put your hql in this format.

Code:
select count( propertyName ) from tableobj;


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.