aspose file tools*
The moose likes Object Relational Mapping and the fly likes Current Row Index for Bulk Updates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Current Row Index for Bulk Updates" Watch "Current Row Index for Bulk Updates" New topic
Author

Current Row Index for Bulk Updates

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

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.


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30294
    
150

It's the ORM forum. I'll move it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Current Row Index for Bulk Updates