0
CREATE OR replace FUNCTION fn_findraise (dept_in   IN VARCHAR2, 
                                      salary_in IN FLOAT) 
RETURN NUMBER 
IS 
  salaryraise NUMBER; 
BEGIN 
    IF dept_in = 'MIS' THEN 
      salaryraise := salary_in * .10; 
    ELSIF dept_in = 'SALES' THEN 
      salaryraise := salary_in * .15; 
    ELSIF dept_in = 'HR' THEN 
      salaryraise := salary_in * .20; 
    END IF; 

    RETURN salaryraise; 
END; 
/

Now I want to call that from within a stored function; lil lost on how to pass the variables, thanks for the help!

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by pritaeas
0

It would be the same as when you use it in a query. You should just be able to call fn_findraise(variable1, variable2)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.