Unable to run a procedure in an Oracle Database

Hi,

I am trying to run a procedure inside a package in an Oracle Database, but I keep getting errors. The action i am using is a custom database command in easymorph.

What I am Trying to run is:
exec apps.HRVIEW_PKG.set_start_date(‘1-Apr-20’);
which is a custom made procedure made inside the database that uses a date parameter (here 1-apr).

The error I get is ORA–00900 invalid SQL statement.

Then I tried changing the “exec” for “Call”, but I got another error (ORA-00911)

How can I run a custom procedure in an Oracle Database? Has anyone else encountered a similar issue?

Thanks in advance !

Hi Sebastian,

The EXEC is a SQL*Plus (or SQL Developer) command. So you can’t run it from EasyMorph.

But you should be able to use the CALL command or a PL/SQL anonymous blocks:

BEGIN
    apps.HRVIEW_PKG.set_start_date('1-Apr-20');
END;

As for the second error, it seems that you just have to remove the trailing semicolon.

Also, it’s possible that with both the CALL command and an anonymous block you will have to specify your date as a DATE literal like the following:

DATE '2020-04-01'