'How can we declare variables in sql and run the Stored procedure in java passing those variables?
Stored procedure run structure is like this :
var sampleVar REFCUSOR;
EXEC SAMPLE_PROC(P_DATE=>TO_DATE('01-JAN-21','DD-MON-YY'),P_DETAILS=>:sampleVar);
I need to run this SP using Java code. But getting error while running 'var sampleVar REFCUSOR;' statement. Error: Invalid Sql statement.
How to resolve this error? Any alternate way to successfully run this Stored Proc using Java.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
