1

I'm following a tutorial on PL/SQL http://www.plsqltutorial.com/plsql-procedure/. I have created procedure with the following code on apex:

CREATE OR REPLACE PROCEDURE adjust_salary(
    in_employee_id IN EMPLOYEES.EMPLOYEE_ID%TYPE,
    in_percent IN NUMBER
) IS
BEGIN
    UPDATE EMPLOYEES
    SET salary = salary + salary * in_percent / 100
    WHERE employee_id = in_employee_id;
END;

However when I try to run

exec adjust_salary(200,5);

I got error

ORA-00900: invalid SQL statement.  

What is the problem and how to fix it?

2
  • 1
    Can you run the statement usin SQL*Plus or some other tool? Maybe APEX won't let you run exec like that. Commented Jan 15, 2012 at 17:03
  • And if you only have Apex try begin adjust_salary(200,5); end; to see what happens. Commented Jan 16, 2012 at 1:52

1 Answer 1

2

I see nothing wrong with your PL/SQL. You should check to see if the Procedural Option is installed:

http://www.techonthenet.com/oracle/errors/ora00900.php

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.