-->
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: Hibernate and subqueries
PostPosted: Tue Apr 05, 2005 1:59 pm 
Regular
Regular

Joined: Sat May 15, 2004 4:27 am
Posts: 79
Hi all

who know how can i resolve my issue with that querie ? I am using Hibernate 2.1.6 with Oracle 9i

net.sf.hibernate.QueryException: in expected: SELECT [

SELECT SUM(taille)
FROM (
SELECT DISTINCT fichierId, taille
FROM com.test.InstanceParTransfert AS Ipa,
FROM com.test.Fichier AS Fic,
FROM com.test.Transfert AS Tr
WHERE Ipa.comp_id.fichierIdFk = Fic.fichierId
AND Tr.transfertId = Ipa.comp_id.transfertIdFk
AND Ipa.comp_id.transfertIdFk = :transfertId
AND Tr.dateCommande BETWEEN :dateDebut AND :dateFin
GROUP BY fichierId, taille
)
HAVING SUM(taille) >= :taille

]

Thanks in advance

-------
Sebastien


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.