-->
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: Update with HQL?
PostPosted: Tue Nov 21, 2006 3:40 pm 
Newbie

Joined: Sun Jan 01, 2006 1:39 pm
Posts: 15
Hello,

I need help to do an update with HQL. I have 2 tables:

Table1
id
name
hash
syncflag

Table2
id
hash

I want to set the syncflag if the hash from Table1 is equals the hash from Table1.

In MySQL Query Browser this statement go:

Update Table1, Table2 set Tabel1.syncflag=1 where Table2.hash=Table1.hash;

How I have to write the HQL Statement do get the right effect? Or if isn`t it possible with HQL language, how I can solv the problem?

I have no relations in the Table1 or Table2 mapping files.

Thanks for help.

Daniel


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.