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!

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.