Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

update query feasible solution  RSS feed

 
rama rajesh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Requirement is updating the emp table, sal column

if sal>=2000 and <3000 add 2000
if sal>=3000 and <4000 add 3000
if sal>=4000 and <5000 add 5000

you can do this in many ways.but what is the feasible solution?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many ranges do you have? If just the thre, I would use three update statements? If a lot, I would use a stored procedure.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!