| Author |
problems while passing the parameters to an oracle procedure Ref Cursor
|
Mahmood Ali
Greenhorn
Joined: Aug 04, 2010
Posts: 11
|
|
Hello All,
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.
Thanks in advance
|
 |
Sudheer Bhat
Ranch Hand
Joined: Feb 22, 2011
Posts: 75
|
|
|
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??
|
 |
Mahmood Ali
Greenhorn
Joined: Aug 04, 2010
Posts: 11
|
|
|
How do I run this procedure from toad?
|
 |
Sudheer Bhat
Ranch Hand
Joined: Feb 22, 2011
Posts: 75
|
|
declare
l_refcur SYS_REFCURSOR; -- if your cursor is weakly typed. Else the declaration will be l_refcur Types.cursor_type
begin
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.
end;
|
 |
 |
|
|
subject: problems while passing the parameters to an oracle procedure Ref Cursor
|
|
|