I am facing problem, in calling a stored procedure from another stored procedure with cursor as one of the argument (OUT).
Create or Replace mai_proc as
This is what i want to do.
Here call_proc as two arguments, 1. a IN, 2. cursor_b OUT.
Problem is how to declare cursor_b?
I cannot use "Cursor cursor_b is <>". But the cursor exepect some return.
Please give the syntax
Thanks in Advance
CREATE OR REPLACE PACKAGE procpack AS
TYPE curtype IS REF CURSOR;
procedure call_proc(a in number,b out curtype);
CREATE OR REPLACE PACKAGE BODY procpack AS
proceduer main_proc is
call_proc(a in number,b out curtype);
procdure call_proc(b in number,c curtype) is
--Following is the syntax for opening REF cursor
OPEN c FOR SELECT a,b.c from xyz;
Hope this would help
Thanks for the help.
Now i facing problem while using the returned Cursor type,
I want to fetch some data out of that cursor b, in main_proc.
If i do a open , it says invalid datatype.
I have to open the cursor and fetch data and do, some operation on data.
Can u tell me whatr is the problem
Thanks in advance
How did u open it ? Please paste the code how u open it
create or replace procedure main_proc as
call_proc(a, out cur_get_approval_list);
--no out is there in code
FETCH cur_get_approval_list INTO a, b
Open, it throws error saying
PLS-00382: expression is of wrong type
Click Here to Expand Forum to Full Width