I am having troubles while passing parameters to an oracle procedure and retruning the values in a ref cursor. The result set is returning a false statement and did not return any value. . I am having year, username parameters which I am passing them to the procedure.
my code is
and here is my procedure which is processed successfully
Can you please help in this matter while passing the parameters.
Did you try running the SQL in the procedure either from SQL*plus or any of the GUI tools for a sample year_v and usr_v values? Does it return values??
Joined: Aug 04, 2010
How do I run this procedure from toad?
Joined: Feb 22, 2011
l_refcur SYS_REFCURSOR; -- if your cursor is weakly typed. Else the declaration will be l_refcur Types.cursor_type
p_get_budget_p(<value for year>, <value for usr_v>, l_refcur);
-- try fetching the value from refcur. If you are not getting any values, then you have a problem with your procedure. You need to be fetching the into a record type which contains all the fields selected by the SELECT statement with proper datatypes.
subject: problems while passing the parameters to an oracle procedure Ref Cursor