Dear experts,
I want to return multiple query result with one refcursor.
create table cust
(
mobnum varchar2(20),
cust_name varchar2(20)
);
insert into cust values('9999','John');
CREATE table CUST_LOC_TB
(
mobnum varchar2(20),
cust_loc varchar2(20)
);
insert into CUST_LOC_TB values('9999','JAPAN');
create or replace
procedure test_proc_1
(
p_mob in varchar2,
p_out out sys_refcursor
)as
begin
begin
open p_out for
select cust_name from cust where mobnum=p_mob;
CLOSE P_OUT;
end;
begin
open p_out for
select cust_loc from CUST_LOC_TB where mobnum=p_mob;
CLOSE P_OUT;
end;
end ;
I know we can able to do by joining two tables,my actaul requirement is to have multiple result with same refcursor
EXPECTED RESULT
--------------
John
JAPAN
I am getting following error
