-->
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: HQL query
PostPosted: Mon Aug 09, 2004 10:55 am 
Newbie

Joined: Thu Aug 05, 2004 9:03 am
Posts: 5
[b]Hibernate version:[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():[/b]
Can somebody please tell me how to write the following query in HQL:

UPDATE WSZ_TERM t SET

(DOCUMENT_COUNT, DOCUMENT_COUNT_ACTUAL, TERM_FREQ_OVERALL)=

(

SELECT LN(t.document_count_actual + count(DOCUMENT_ID)),

t.document_count_actual + count(DOCUMENT_ID),

t.term_freq_overall + SUM(FREQ_PER_DOC_ACTUAL)

FROM WSZ_TERM_FREQUENCY_PER_DOC

WHERE BATCH_ID = ?

AND TERM_NAME=t.TERM_NAME

group by TERM_NAME

)

WHERE TERM_NAME IN

(

SELECT distinct(TERM_NAME)

FROM WSZ_TERM_FREQUENCY_PER_DOC

WHERE BATCH_ID = ?

)
Please help!

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:[/b]

[b]Debug level Hibernate log excerpt:[/b]


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.