Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL Function
PL/SQL Function [message #37955] Fri, 08 March 2002 08:59 Go to next message
Val
Messages: 12
Registered: March 2002
Junior Member
Hi,
I'm new to PL/SQL and I need to create a function to increase salary using these rules :
Salary between 1 and 999 raise rateby 8%
Salary between 1000 and 1999 raise rate by 5%
Salary between 2000 and 29000 raise rate by 3%
Salary >= 3000 raise rate by 1%

How do I do this? Any help with the script would be greatly appreciated!

Val
Re: PL/SQL Function [message #37957 is a reply to message #37955] Fri, 08 March 2002 09:49 Go to previous message
Doris
Messages: 7
Registered: March 2002
Junior Member
i think this is the way you should do it...
for example:

update table emp set salary = salary * 0,08
where salary >= 1 and salary <= 999;

and then changes the values for the other rates...
Previous Topic: Utl_file package
Next Topic: varying elements in IN list
Goto Forum:
  


Current Time: Sun Oct 17 08:36:01 CDT 2021