The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Execute SQL Operator - Calling Oracle Stored Procedure - Invalid SQL Statement
Trying to call an Oracle stored procedure using the Execute SQL operator and getting
Database error occurred: ORA-00900: invalid SQL statement.
The SP I'm trying to call is located within the schema that I've configured the connection for.
I can execute the SP successfully while connected via SQL Developer.
I've tried:
EXECUTE <SP_NAME>
EXECUTE <SCHEMA>.<SP_NAME>
EXEC <SP_NAME>
EXEC <SCHEMA>.<SP_NAME>
I was able to successfully run SELECT SYSDATE FROM DUAL using Execute SQL operator.
Thanks in advance.
0
Best Answer
-
dfostr Member Posts: 3 Contributor IHi. I had the same issue and found a working solution on Stack Overflow (I can't post the link but search for answer # 47134774) - it seems JDBC does not recognize EXEC so instead wrap your SP within an anonymous PL/SQL block, i.e.:
BEGIN
<SP_NAME>
END;
5
Answers