convert a plsql code into 1 sql statement [message #309770] |
Fri, 28 March 2008 14:04 |
kanjiri123
Messages: 3 Registered: March 2008
|
Junior Member |
|
|
i have a plsql stored proc as below and i want to convert that proc into 1 sql statement:
CREATE OR REPLACE PROCEDURE emp_bonus IS
SALES NUMBER(8,2) := 12100;
QUOTA NUMBER(8,2) := 10000;
bonus NUMBER(6,2);
emp_id NUMBER(6) := 120;
BEGIN
IF SALES > (QUOTA + 200) THEN
bonus := (SALES - QUOTA)/4;
ELSE
bonus := 50;
END IF;
UPDATE EMPLOYEES SET salary = salary + bonus WHERE employee_id = emp_id;
END;
Can someone help me this?
thanks in Advance.
|
|
|
|
|
|
|
|