AnsweredAssumed Answered

How do you call a stored function and pass a date parameter?

Question asked by abhinandan.nandi756366 on Dec 19, 2017
Latest reply on Dec 19, 2017 by Sjaak Overgaauw

In my integration scenario, I need to call a stored function in from an oracle 11.2g database. From my search, I found that one way to retrieve the value from a function is:

 

select XXSOA_B2B_UTILITIES.Check_Open_Periods
(p_txn_date => CURRENT_DATE
) from dual;

 

However, this is not possible for me, because there is DML in the stored function, so the following error occurs:

 

ORA-14551: cannot perform a DML operation inside a query

 

Additionally, the functions parameter is a date field and any attempts to pass CURRENT_DATE or a TO_DATE() function lead to the following error:

 

Error executing sql statement: Missing IN or OUT parameter at index:: 1; Caused by: Missing IN or OUT parameter at index:: 1

 

Which is most likely an error with the JDBC drivers used to execute these statements.

 

Is there another way to call stored functions and retrieve the return value from them?

Outcomes