File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Current Row Index for Bulk Updates

 
Ankit Garg
Sheriff
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • 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: 33687
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the ORM forum. I'll move it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic