create or replace function DBA.SOME_METRIC return number is
I has no input arguments and a numeric output
When I run from PL/SQL the function returns a valid metric, However when I run from matlab:
x = runstoredprocedure(c,'DBA.SOME_METRIC',{},{java.sql.Types.NUMERIC})
I get the following error:
??? Java exception occurred:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SOME_METRIC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:315)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:281)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:638)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:183)
at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:872)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1085)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2983)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3056)
at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4295)
Error in ==> database.runstoredprocedure at 81
csmt.executeUpdate;
Any help is appreciated :)
Regards,
Somi
Thanks,
Sven.
"Somesh " <see...@gmail.com> wrote in message <h5cm8i$48o$1...@fred.mathworks.com>...
I actually have no problem running a stored *procedure*. The error that was occurring in my previous post was only on trying to "run" a function in an oracle package, rather than a procedure.
Perhaps the original poster had the same problem.
Cheers,
Sven
"Sven" <sven.h...@gmail.deleteme.com> wrote in message <hp5ako$sir$1...@fred.mathworks.com>...