This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Current Row Index for Bulk Updates

 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I'm not sure whether this was the correct forum for this question or ORM forum so I posted it here. I have a table with this structure

User_Table
Id
name
rank
points
join date


Now I want to run a bulk update command to set the rank based on the points and join date. So I want to run a query like this



Now what I don't know is how to represent this |row index| in the query. Is there any solution in JPQL?? Or is there any native query for this. I'm using MySQL 5.0.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the ORM forum. I'll move it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic