SQL help (Oracle)

Associate
Joined
12 Mar 2005
Posts
2,021
Location
Scotland
Hi there,

Im working on playing with a database iv made and needing some help.

Iv made code to update SALARY on the staffs join day (dd-mm) which works fine.

Code:
UPDATE STAFF
SET SALARY =
   CASE
       WHEN GRADE = '1' THEN SALARY+700
       WHEN GRADE = '2' THEN SALARY+600
       WHEN GRADE = '3' THEN SALARY*1.05
       WHEN GRADE = '4' THEN SALARY*1.04
       ELSE SALARY
   END
WHERE TO_CHAR(JOINDATE, 'DD-MM') = TO_CHAR(SYSDATE, 'DD-MM')


How can i get this to automaticly run this once a day (be it script or trigger etc)

can you get a trigger to work on a WHEN e.g. WHEN systime=0700 sort of idea?

Any help would be great!

Thanks
 
Last edited:
Back
Top Bottom