-
Hi friends,
I wanted to know how to wend the results back to the application calling the procedure?
Since I am new to the pl/sql development , will someone tell me the steps?
My procedure is as under:
************************
create or replace procedure proc2
(cc_date_start1 number, cc_date_end1 number,
cc_date_start2 number, cc_date_end2 number,
vpar_list varchar2)
is
vpar_d_num pkg1.array;
vtmp_counter number:=1;
vtmp_list varchar2(4000);
dail_numbers_not_entered exception;
Callconnect_time_not_entered exception;
begin
commit;
vtmp_list:=vpar_list;
while vtmp_list is not null loop
if instr(vtmp_list, ',') = 0 then
vpar_d_num(vtmp_counter):=vtmp_list;
exit;
end if;
vpar_d_num(vtmp_counter):=substr(vtmp_list,1,instr(vtmp_list,',')-1);
vtmp_counter:=vtmp_counter+1;
vtmp_list:=substr(vtmp_list,instr(vtmp_list,',')+1, length(vtmp_list));
end loop;
FOR i IN vpar_d_num.FIRST..vpar_d_num.LAST loop
FOR j IN vpar_d_num.FIRST..vpar_d_num.LAST loop
if i != j and vpar_d_num(i)=vpar_d_num(j) and vpar_d_num(i) !='-99' then
vpar_d_num(j):=-99;
end if;
end loop;
end loop;
FORALL i IN vpar_d_num.FIRST..vpar_d_num.LAST
insert into tds_manager.temp_table1 (
d_num,
cc_date,
i_type,
i_addr,
a_type,
a_addr,
corporate_id,
ser_loc
)
select d_num,
cc_date,
i_type,
i_addr,
a_type,
a_addr,
corporate_id,
ser_loc
from icdr_copy where
d_num = vpar_d_num(i)
and ( ( cc_date >= cc_date_start1 and cc_date <= cc_date_end1)
or
( cc_date >= cc_date_start2 and cc_date <= cc_date_end2)) ;
end;
/
******************************
Thanks
manjunath
-
Hi new dude
u have to use the OUT parameter for getting back the values from the procedure..
test code
declare
varoutparam number;
--calling procedure
procedurename(param1,param2,varoutparam);
--try displaying the value of varoutparam here
end;
For more info. try getting into the pl/sql development help and check for IN AND OUT PARAMETERS..
vijays
Vijay.s
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|