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;
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;
open p1 for select * from emp where deptno=10;
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
So What exactly benifit for us from
using Ref cursor in reports.