-->
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.  [ 3 posts ] 
Author Message
 Post subject: [HIBERNATE] count avec createSQLQuery
PostPosted: Tue Jan 03, 2006 12:25 pm 
Newbie

Joined: Tue Jan 03, 2006 12:22 pm
Posts: 3
Bonjour,

je voudrais juste connaitre la syntaxe pour faire un count avec createSQLQuery et Hibernate2


Pour l'instant je fais ça :
SELECT count({pack}.*) FROM DETAILED_RATE_DOWNLOAD as {pack} WHERE ...

mais ça ne marche pas qd hibernate l'execute ça renvoit l'erreur suivante :
ORA-00907: missing right parenthesis

voilà
Merci de votre aide
Pat


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2006 5:33 am 
Beginner
Beginner

Joined: Tue Jul 05, 2005 4:44 am
Posts: 40
Location: Paris, France
Salut,


As-tu essayé simplement ça :
Code:
SELECT count(*) FROM DETAILED_RATE_DOWNLOAD as {pack} WHERE ..


++

_________________
Fred


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 11, 2006 8:17 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
ce que tu fais est bien. Peut-etre un probleme dans le where clause.
le message est claire, peut-etre tu imprints le SQL pour diagnostique.

Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.