aspose file tools*
The moose likes Oracle/OAS and the fly likes update query feasible solution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "update query feasible solution" Watch "update query feasible solution" New topic
Author

update query feasible solution

rama rajesh
Greenhorn

Joined: Jun 22, 2010
Posts: 28
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
Marshal

Joined: May 26, 2003
Posts: 30925
    
158

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.


[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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: update query feasible solution