I have follow text:
cursor ovd_open ( ind varchar2) is
SELECT iovdacc,dovdcrt,ccusname...
FROM igg.ovd a,...
WHERE iovdacc=iaccacc ...
order by ind;
begin
list_id:=find_item('LIST_DR');
if :list_dr='LIST314' then
tt:=' dovdcrt desc ';
ELSIF :list_dr='LIST315' THEN
tt:=' ccusname';
ELSE
go_block('OVD');
end if;
go_block('OVD');
OPEN ovd_open(tt);
clear_block(NO_VALIDATE);
loop
fetch ovd_open into vd.iovdacc....
exit when ovd_open%notfound;
next_record;
end loop;
But, statement 'order by..' don't work properly..
Why?
cursor ovd_open ( ind varchar2) is
SELECT iovdacc,dovdcrt,ccusname...
FROM igg.ovd a,...
WHERE iovdacc=iaccacc ...
order by ind;
begin
list_id:=find_item('LIST_DR');
if :list_dr='LIST314' then
tt:=' dovdcrt desc ';
ELSIF :list_dr='LIST315' THEN
tt:=' ccusname';
ELSE
go_block('OVD');
end if;
go_block('OVD');
OPEN ovd_open(tt);
clear_block(NO_VALIDATE);
loop
fetch ovd_open into vd.iovdacc....
exit when ovd_open%notfound;
next_record;
end loop;
But, statement 'order by..' don't work properly..
Why?