File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

update query feasible solution

rama rajesh

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

Joined: May 26, 2003
Posts: 33102

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: update query feasible solution
It's not a secret anymore!