Could it be possible to have if else condition with a for loop
E.g.
IF (emp_no IS NULL) then
for i in (select * from employees where emp_no= p_retval)
else
for i in (select * from employees where emp_no= p_retval_withcond)
end if;
When I tried the above I have got compilation errors.
Regards