Hi,
I want to use one of two cursors in same for loop as follows but my syntax is off
declare
d number:=2;
rec_type
begin
if(d=3)then
cursor xyz is
select 'g' col1,'h' col2,'j' col3,'k' col4 from dual;
else
cursor xyz is
select '2g' col1,'2h' col2,'2j' col3,'2k' col4 from dual;
end if;
for rec in xyz loop
htp.p(rec.col1||' -- '||rec.col2||' -- '||rec.col3||' -- '||rec.col4 );
end loop;
end;