Dear Friends,
Can any one tell me Whats more advantage
in ref cursor than lexical parameter.
I am using Reports 6i.
In refcursor i am using. assuming P_1 is parameter name and i write code in after parameter form and my data model is created by ref cursor.
p is ref cursor;
p1 p;
if :P_1 is null then
open p1 for select * from emp;
else if :p_1=7369
open p1 for select * from emp where empno=7369;
else
open p1 for select * from emp where deptno=10;
end if;
The above code is working depending
upon parameters in run time.
I am asking about, i can able to do
the above codes by lexical parameter also.
in my data model i am using select * from emp &p
p is lexical parameter, i can able
to give a parameter at
run time like this
where empno=7369
where deptno=10
So What exactly benifit for us from
using Ref cursor in reports.
Advance Thanks...
Mano