-->
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: UPDATE TABLE SET... FROM ...
PostPosted: Mon Dec 26, 2011 8:20 pm 
Newbie

Joined: Mon Oct 24, 2011 5:46 pm
Posts: 3
Hi. I can do in a HQL:
Code:
INSERT INTO Bean (pro1,pro2,pro3,n) SELECT ... FROM ...


but I can't do

Code:
UPDATE Bean SET pro1 = b.pro2 FROM Bean b WHERE ...


i catch the next error:

line 3:1: unexpected token: FROM
Error
java.lang.IllegalArgumentException: node to traverse cannot be null!

Thanks


Top
 Profile  
 
 Post subject: Re: UPDATE TABLE SET... FROM ...
PostPosted: Thu Dec 29, 2011 5:50 am 
Beginner
Beginner

Joined: Tue Aug 16, 2005 3:44 pm
Posts: 33
alexkun wrote:
Code:
UPDATE Bean SET pro1 = b.pro2 FROM Bean b WHERE ...



Hi :)

I'm have not testet the following code but what about something like

Code:
UPDATE Bean SET pro1 = pro2 WHERE...


-Kaj :)


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.